Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Fubarable

Thread: add a JDesktopPane into JPanel problem

  1. #1
    mitra is offline Member
    Join Date
    Jun 2011
    Posts
    59
    Rep Power
    0

    Default add a JDesktopPane into JPanel problem

    Hi.........

    I have a class which extends JPanel and here I have added JDesktopPane.

    This JDesktopPane hold or added object of another class which extends JInternalFrame.

    But its not working, internal frame is not showing.

    If I changed JPanel to JFrame then its working.

    But I need JPanel.
    So how can I do it?

    Help me.
    Thank you.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: add a JDesktopPane into JPanel problem

    Please make a small simple program that compiles, executes and shows your problem.

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

    Default Re: add a JDesktopPane into JPanel problem

    Likely your problem is that you're not taking the JPanel's layout into account. By default it uses FlowLayout, and perhaps you want it to use a BorderLayout, but it's hard to say as your original post doesn't give us any detail that would allow us to know what is wrong. Please see the link in my signature on how to ask smart questions to see what information we need in your questions.
    DarrylBurke likes this.

Similar Threads

  1. Can JDesktopPane can have a background JPanel?
    By chyrl in forum AWT / Swing
    Replies: 13
    Last Post: 10-22-2010, 06:56 AM
  2. JDesktopPane contains JPanel?
    By chyrl in forum Advanced Java
    Replies: 1
    Last Post: 09-22-2010, 12:01 PM
  3. JDesktopPane Design
    By t500yo in forum AWT / Swing
    Replies: 5
    Last Post: 08-03-2010, 03:19 PM
  4. JDesktoppane?
    By skatefreak in forum New To Java
    Replies: 2
    Last Post: 01-31-2009, 05:32 PM
  5. How to clear JDesktopPane
    By hendrix79 in forum New To Java
    Replies: 12
    Last Post: 12-10-2008, 11:25 PM

Tags for this Thread

Posting Permissions

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