redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

problem with JButton objects creation



 
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum
View previous topic :: View next topic  
Author Message
Ikopar



Joined: 26 May 2006
Posts: 168
If I have a class that extends JPanel, why am I only allowed to create JButton objects in the constructor of this base class and not in other methods of the class?
To be more clear, creating and adding buttons shows no changes in the actual window.
  Reply with quote


Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Ikopar, can't you do it with the this.add()?
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
i just have an inner class that calls add() directly.
  Reply with quote
Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Add on the base class?
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
The base class extends JPanel, and the performs add() in the inner class of the base class.
  Reply with quote
Lusis Backwood JR



Joined: 26 May 2006
Posts: 87
Location: United States
Ikopar: i don't know wtf you just said
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
Right, let me rephrase that.
The base class, FOO, extends JPanel. inside the base class I have an inner class which calls the add() function of the base class, FOO.
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group