Results 1 to 4 of 4
  1. #1
    koko20 is offline Member
    Join Date
    Apr 2011
    Posts
    4
    Rep Power
    0

    Default how to create a JTabbedPane java?

    hey

    i have an imageViewer and i want to change the imagePanel into a TabbedPane so i can have more than one image open at the same time but have each of them in a different tab and be able to add and remove the tabs as well.

    what i have:

    private ImagePanel imagePanel; //<< i tried to change the ImagePanel to JTabbedPane but it doesn't work and it gives error in other parts of the codes that i have.

    // Create the image pane in the center
    imagePanel = new ImagePanel();
    imagePanel.setBorder(new EtchedBorder());
    contentPane.add(imagePanel, BorderLayout.CENTER);



    the code above is for the image pane where the image is displayed.
    is it possible to change the image pane to a tabbedPane without changeing other bits in the code?
    i have looked at alot of tabbedpane examples but i don't know how to combine the code with my code to get it to work but i did put a few code examples into my program but the frame changes to tabbedpane and not the image pane where the image is displayed. i want to change the inner frame to tabbed not the actual frame of the program.
    any suggestions on how should i go about it or if you can show me a simple example that could work.

    thank you

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

    Default

    Already answered in cross-post at StackOverFlow, a reply that you never responded to.

    Please don't cross-post questions without notifying all fora that you are doing this. It's not fair to the volunteers here or there.

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

  4. #4
    koko20 is offline Member
    Join Date
    Apr 2011
    Posts
    4
    Rep Power
    0

    Default

    I would like to apologise for the cross-post matter i didn't mean to break rules of the forums.
    Fubrable thankx for your reply and i just checked the forums, i was offline.

Similar Threads

  1. JTabbedPane problem
    By nik_meback in forum AWT / Swing
    Replies: 2
    Last Post: 01-01-2011, 12:27 PM
  2. Using JtabbedPane
    By simmi in forum AWT / Swing
    Replies: 9
    Last Post: 03-24-2010, 12:24 PM
  3. Traversing a JTabbedPane
    By Inks in forum AWT / Swing
    Replies: 12
    Last Post: 03-11-2009, 05:15 AM
  4. How to use JTabbedPane
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-27-2008, 07:50 PM
  5. Help with JTabbedPane
    By lenny in forum SWT / JFace
    Replies: 1
    Last Post: 08-07-2007, 06:18 AM

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
  •