aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Replacing a specific Jbutton in a grid  with 8 new buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Replacing a specific Jbutton in a grid  with 8 new buttons " Watch "Replacing a specific Jbutton in a grid  with 8 new buttons " New topic
Author

Replacing a specific Jbutton in a grid with 8 new buttons

stup walker
Greenhorn

Joined: Mar 11, 2004
Posts: 1
Hi
I am using a package where all the buttons are added to a gridbag (4 rows and two colu) using a function call from the constructur of buttons class again the grid internally contains
a box layout for each row and JButtons are added in this BOX these JButtons
are of Type portButtons which are initialized in other class portButtons which is in diffrent .java file.The Listener are implemented in portButtons class.
Now i needs to be replaced the button from top row with 8 new buttons when the Button corresponding to it in third row is clicked.
IS there any method by which i can dynamically remove the components of JPanel in action listener and replace it with 8 new buttons and also romving and readding the other components of JPanel.how to use paint and repaint method to remove and add new buttons.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Replacing a specific Jbutton in a grid with 8 new buttons
 
Similar Threads
need help with JPanel, liseners, and referencing vectors
mock question from appliedreasoning.com
Help me display array of JButtons properly
Beginning GUI programming exercise. Please help to figure out why it does not compile.
Do I need to copy the functions?