This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Yehuda
Yehuda presents ...

2017/4/20

Clock

This is a GUI Clock/Stop watch/Timer that I made. It should be pretty easy to figure out how to use by yourself. Please report bugs, comments, questions, or complaints.

3507 views / 8 in the last 7 days

1 vote | 0 in the last 7 days

Tags: with-source gui timer stopwatch yehuda

This scenario is a member of: Graphical User Interface


open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

YehudaYehuda

2017/4/21

What's the difference between mentioning that you told me to try that and giving you credit for the fix? Giving you credit is mentioning that you gave me the fix. (I did thank you for it.) I still have a question in the discussion which you didn't answer (you only answered Wasupmacuz's question).
danpostdanpost

2017/4/21

QUOTE = Yehuda "I still have a question in the discussion which you didn't answer" ---------------------------------- The answer is essentially given in my response to Wasupmacus's question. The GUI control frame (where the Reset and Run buttons are located) limits the width of the applet.
YehudaYehuda

2017/4/21

So what do I have to do to make only one set of Components appear (making the frame bigger just makes more sets visible, making it smaller makes my one set not fully visible).
danpostdanpost

2017/4/21

I think you just need to repaint the background of the world: getBackground().fill(); as one the first few lines after the 'super' call in the constructor.
YehudaYehuda

2017/4/21

How can that work, we're not dealing with drawing colors onto the frame/panel these are Components, if you try clicking on one of them it will work like it should. (It didn't work.)
danpostdanpost

2017/4/21

Okay. Found the solution. After the 'super' call, you get the world canvas; immediately after that you need to place the following line: worldPanel.removeAll();
YehudaYehuda

2017/4/23

@danpost Seriously! That's what I did, now I come here and see that's what you tell me to do (now is the first time I'm on the website ever since my last comment). I figured that every time I press reset I still have the same JPanel so I just keep on adding more things to the same one - until I exit Greenfoot.
YehudaYehuda

2017/4/23

Thanks anyway for the help.
A new version of this scenario was uploaded on 2017-04-23 22:40:56 UTC Fixed and changed some things. For danpost: In case I missed any mentions or thanks then here it is.
YehudaYehuda

2017/4/23

It's much better now.

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Nosson1459