How can i repaint my frame after adding new component

C

crazybird_2005

i want that as choose user option from the combobox my frame shows
different component with respect to the option chosen by the user in
the combobox
 
A

Andrew Thompson

i want that as choose user option from the combobox my frame shows
different component with respect to the option chosen by the user in
the combobox

Probably a CardLayout is what best fits here.
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/CardLayout.html>

Note that the best group for GUI questions is.
<http://www.physci.org/codes/javafaq.jsp#cljg>

And while I have your attention, and since you are
posting from one of the more popular web interfaces..
<http://www.physci.org/codes/javafaq.jsp#google>

HTH
 
C

crazybird_2005

i take panel i which i add combobox containing all batches running in
the center
As user choose batch in which he/she want to associate candidate
already registered for the course for which that batch was announce.

for that i registered that panel as ActionListener for that combobox

on selecting option from this combobox it trigerred the action command
where i call repaint() method in the paintComponent methid i try to add
the label component and the listbox showing name of all the candidates
enrolled for that course.
but it don't work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top