Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 More Swing Help needed...
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jodo Yodo




PostPosted: Sat Apr 09, 2005 6:23 pm   Post subject: More Swing Help needed...

Okay, I get an error with createAndShowGUI (), and I dont' know why.


MovieWicketz0rz.java
 Description:

Download
 Filename:  MovieWicketz0rz.java
 Filesize:  4.84 KB
 Downloaded:  877 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Hikaru79




PostPosted: Sun Apr 10, 2005 8:24 am   Post subject: (No subject)

createAndShowGUI() can throw an IOException. Replace
Java:
public void run() {
                createAndShowGUI();
            }

With:
Java:
     public void run(){
                try{
                createAndShowGUI();
                }
                catch (IOException f){System.out.println(f);}
            }


And all will be well Smile Doesn't RTP tell you these things? NetBeans 4.0 did right off the bat. Try http://netbeans.org . Ask not what you can do for your IDE, but what your IDE can do for you!
rizzix




PostPosted: Sun Apr 10, 2005 9:55 am   Post subject: (No subject)

NOOOO!!! dont ever do that. unless that is the ONLY thread used for GUI stuff. if not then DONT. and re-design ur appliaction..

good heavens... never never never create or call swing objects from multiple threads.. (this inlcudes the main-thread)
Hikaru79




PostPosted: Sun Apr 10, 2005 1:36 pm   Post subject: (No subject)

rizzix wrote:
NOOOO!!! dont ever do that. unless that is the ONLY thread used for GUI stuff. if not then DONT. and re-design ur appliaction..

good heavens... never never never create or call swing objects from multiple threads.. (this inlcudes the main-thread)


Rizzix, there's more than just that. He's holding the movie statistics in the same class -- it's a total butchering of the MVC architecture (the whole program is only one class). However, this project is due tomorrow, so right now is not the time to be bringing these things up for him Sad
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: