Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to replace one JButton by two other JButtons during application run ?

Reply
Thread Tools

How to replace one JButton by two other JButtons during application run ?

 
 
Ulf Meinhardt
Guest
Posts: n/a
 
      11-14-2005
I want to replace a JButton mybut1 which is placed on a JPanel by two other JButtons mybut2 and mybut3.
The replacement should oocur during the run of the application (e.g. if Button1 is visible and
I click on it).

How do I do this?

Maybe I can toggle on and off the visibility of the signle Button resp. the Button pair. (if this is easier)?

Do I need two different Panels?

Ulf

 
Reply With Quote
 
 
 
 
Michael Dunn
Guest
Posts: n/a
 
      11-14-2005

"Ulf Meinhardt" <> wrote in message
news:4378a50d$0$7420$...
>I want to replace a JButton mybut1 which is placed on a JPanel by two other
>JButtons mybut2 and mybut3.
> The replacement should oocur during the run of the application (e.g. if
> Button1 is visible and
> I click on it).
>
> How do I do this?
>
> Maybe I can toggle on and off the visibility of the signle Button resp.
> the Button pair. (if this is easier)?
>
> Do I need two different Panels?
>
> Ulf
>


you can lead a horse to water.....


 
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
Memory Game: Comparing two JButtons with actionListener sanilio@gmail.com Java 1 11-06-2008 05:41 PM
Create JButtons from array Brian Java 4 02-03-2008 01:29 AM
Events with multiple JPanels and JButtons Oxnard Java 1 11-18-2004 03:06 AM
JButtons in JTables BNM Java 0 01-30-2004 09:42 PM
Making two JButtons "rollover" in sync Brian J. Sayatovic Java 6 08-08-2003 04:42 AM



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