Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How can i repaint my frame after adding new component

Reply
Thread Tools

How can i repaint my frame after adding new component

 
 
crazybird_2005
Guest
Posts: n/a
 
      07-15-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

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-15-2005
On 15 Jul 2005 02:09:46 -0700, crazybird_2005 wrote:

> 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

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
You Can't Prove It Won't Happen
 
Reply With Quote
 
 
 
 
Kurt M Peters
Guest
Posts: n/a
 
      07-15-2005
Have you tried using Component.repaint()?
K
"crazybird_2005" <> wrote in message
news: oups.com...
>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
>



 
Reply With Quote
 
crazybird_2005
Guest
Posts: n/a
 
      07-15-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

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-15-2005
On 15 Jul 2005 07:03:05 -0700, crazybird_2005 wrote:

> i take panel i which i add combobox ..


Let the code do the talking.
<http://www.physci.org/codes/sscce.jsp>

> but it don't work


Lazy, is it?
<http://www.physci.org/codes/javafaq.jsp#specific>
<http://www.physci.org/codes/javafaq.jsp#exact>

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
LOADING....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foo.bar.Frame] can not inherit from [java.awt.Frame] Maciej Labanowicz Java 8 04-11-2012 07:18 PM
Re: java.awt.Frame - How to repaint without background update MaciekL Java 2 08-05-2011 07:48 PM
java.awt.Frame - How to repaint without background update MaciekL Java 1 08-05-2011 11:36 AM
How to update other frame when new document loaded into a frame Jim Cobban Javascript 0 07-31-2005 05:47 PM
Is there any POP3 and NNTP component I can use as a ASP Component? Miguel Minora ASP General 1 01-11-2005 10:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57