Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0

    Default how to code a button to switch a certain tab in the jtabbedpane

    hi Friends!

    i am develloping an application,that needs buttons on the first page( tab1),each button to
    switch a certain tab.

    thanks,hope that i will get soon ur reply

  2. #2
    SurfMan's Avatar
    SurfMan is online now Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    931
    Rep Power
    2

    Default Re: how to code a button to switch a certain tab in the jtabbedpane


  3. #3
    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0

    Default Re: how to code a button to switch a certain tab in the jtabbedpane

    may be my question is not clear,let me try to explain it more

    as the photo is attached to this message ,i have jbutton1 and jbutton2 on tab1 i want to code jbutton1 so that when i press it to
    reach tab2 when i click jbutton2 to reach tab3;
    Attached Thumbnails Attached Thumbnails how to code a button to switch a certain tab in the  jtabbedpane-tab.png  

  4. #4
    SurfMan's Avatar
    SurfMan is online now Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    931
    Rep Power
    2

    Default Re: how to code a button to switch a certain tab in the jtabbedpane

    Yes, that is exactly what I understood. Again, read this link: JTabbedPane (Java Platform SE 7 ) . It is all about how to set the index of the selected tab. So if you want to activate the second tab, you write myTabbedPabe.setSelectedIndex(1).
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,512
    Rep Power
    5

    Default Re: how to code a button to switch a certain tab in the jtabbedpane

    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  6. #6
    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0

    Default Re: thanx!SurfMan

    let me do that,i hope now that it will run

Similar Threads

  1. Replies: 3
    Last Post: 11-13-2013, 03:04 PM
  2. button to switch off or on for music backgroud
    By palie in forum New To Java
    Replies: 1
    Last Post: 03-28-2012, 01:32 AM
  3. How can I make tab button of Jtabbedpane biger
    By calippus in forum AWT / Swing
    Replies: 2
    Last Post: 06-22-2011, 09:40 PM
  4. Button in JTabbedPane
    By nik_meback in forum AWT / Swing
    Replies: 1
    Last Post: 12-27-2010, 11:07 PM
  5. Help with Switch string code
    By toby in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:00 AM

Posting Permissions

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