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

Username:   Password: 
 RegisterRegister   
 JMenu Doesn't Appear
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
[Gandalf]




PostPosted: Mon Jul 03, 2006 8:20 pm   Post subject: JMenu Doesn't Appear

Not an interesting help question, but it's been bugging me for a few hours.

I wanted to try out some GUI stuff in Java, and it works fine on it's own, but when I combine it with some draw methods, the GUI components don't appear. I've looked all over the Java docs for something which I've possibly missed when overloading the various methods, and other stuff like that, but to no avail.

Attached is a quick example I set up to demonstrate when this happens with double buffering.



MenuTest.java
 Description:
JMenu + Double Buffering

Download
 Filename:  MenuTest.java
 Filesize:  1.81 KB
 Downloaded:  115 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
HellblazerX




PostPosted: Mon Jul 03, 2006 8:54 pm   Post subject: (No subject)

I would keep the double buffering in a separate component of its own, like a JPanel, and then add that JPanel in your JFrame. What you did was you overloaded the JFrame's paint () method, so the JMenuBar was not draw in at all. However, if you included a super.repaint () in there, what would happen is that your double buffer would disappear, and the only thing you would be able to see is the GUI components.
0101fx




PostPosted: Thu Jul 13, 2006 12:40 am   Post subject: (No subject)

try with threads because are process independient..and you will se how wondelfull is java
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  [ 3 Posts ]
Jump to:   


Style:  
Search: