Results 1 to 5 of 5
  1. #1
    shaay is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default add a panel to jdesktoppane

    hi guys...

    i hava a jframe,which has 2 jradiobutton ,and i have another 2 jpanel foam...
    when i click the jradiobuton...one of the panel should appear on jdesktoppane,which is in the jframe.

    plz say me how to do it...

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    shaay: You may wish to respond to replies made in your previous thread. This can help motivate folks to help you again.

    As to your current problem: what have you tried so far, and what isn't working -- where's the hang up? Also, have you gone through the Swing tutorials on how to use JDesktopPanes and JInternalFrames?

  3. #3
    shaay is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    srry 4 not replying last post.....

    i tried to add one of the panel to the jdesktoppane...when the jradiobutton is selected....

    this is the code i tried in jradiobutton action event....

    if(jradiobutton1.isSelected){
    JPanel jp=new JPanel1()
    jp.setVisible(true);
    jDesktopPane1.add(jp);

    }

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  5. #5
    shaay is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    thnx guys for ur replies ..... i did this on a different way........

Similar Threads

  1. JDesktopPane Design
    By t500yo in forum AWT / Swing
    Replies: 5
    Last Post: 08-03-2010, 03:19 PM
  2. JDesktoppane?
    By skatefreak in forum New To Java
    Replies: 2
    Last Post: 01-31-2009, 05:32 PM
  3. How to clear JDesktopPane
    By hendrix79 in forum New To Java
    Replies: 12
    Last Post: 12-10-2008, 11:25 PM
  4. JDesktopPane demo
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 07:43 PM
  5. How to add SystemTray to JDesktopPane
    By elisabethkron@yahoo.co.uk in forum Advanced Java
    Replies: 0
    Last Post: 04-07-2008, 08:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •