FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Java Refresh Problem





mschnell
I have written a program that does everything I want it to do except that the GUI won't show up until I resize the window in some way. I have no idea how to get it to just show up on open. It's been driving me nuts. Is there a command that I can just put in at the end of my code to make it refresh or make it show up somehow? It is basically one JPannel with two more JPannels on top of that that comprise the main GUI. Thanks for any help.
Nyizsa
As a temporary solution you may try to add a function to the onload event of <body> which maximizes the window, this way refreshing it. But I have no idea about the real problem...
mschnell
Yah, my TA said it would be ok as long as the code looked alright so I guess I'm going to stop worrying about it. Thanks for your help.
mschnell
I've solved my own problem. I put some commands such as Jframe.setVisible() or something like that in the object itself rather than in the main method where they belonged.
tobytobsen
The correct solution regard to MVC - Model View Control. Make you familiar with ít. You don't have to update the graphics on your own, only update the model, and the view, which is watching the model updates itself!

Toby
Related topics
Problem with opening a word doc from site hosted in frihost
Forum Problem
IE 6 problem (bugs me off)
I can't run some programs? Why?
Problem with FriHost forum
Forbidden to view page problem!
php page-refresh/redirect/boot help needed please
Java bufferedReader problem
Problem with pages upgrades...
Java classpath problem
Java vs. C++
Problem with javax.sound.midi (Java)
java applet refresh problem
Java runtime problem
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.