Tab of JTabbedPane bug perhaps?

I've noticed many instances of JTabbedPane not setting current selected
tabs to a specified color. I find this kind of strange since it seems
like it's the other way around on my Solaris as well as my HP-UX box.
What I'm wondering is if this is a new bug that got introduced by an
attempt to "fix" the original bug where the selected tab is not taking
the new color? If so, what's the workaround to getting the unselected
tabs to respect the new color that one wishes to invoke?
I've tried a myriad of techniques to get this unselected tab color to
change to the color I wished for it to be, but to my dismay it always
stay a Color.darkGray color. I was successful in changing the background
of the selected, but not the unselected tabs.
I've used UIManager and my own customized LookAndFeel manipulator to
get the other stuff to work, except for this annoying "bug" it seems.
Please help..
Thanks in advance..

Well.. I've been doing that and nothing seems to budge..
Not sure exactly why it seems like whatever is done whether
it be through the custom L&F or through custom subclass of
JTabbedPane that forcibly/manually alter the color properties,
nothing happens.
So, to me, it just feels like an internal JVM bug.

Similar Messages

  • Changing Colors of selected tab in JTabbedPane.

    Do someone has some code that can show how to
    change the color of the selected tab with JTabbedPane.
    I can change the other tabs colors with setBackground and setForeground, setBackgroundAt........ but it is the selected
    tab that will not change from the default grey color.
    thanks

    try this code, it works.
    public class TabBackgroundChange extends JFrame {
    private JTabbedPane tabPane = null;
    public static final Color selTabColor = Color.red;
    Color nonSelectedTabColor = null;
    public TabBackgroundChange() {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception ex) {
    ex.printStackTrace();
    tabPane = new JTabbedPane();
    tabPane.add("One", new JPanel());
    tabPane.add("Two", new JPanel());
    tabPane.add("Three", new JPanel());
    this.getContentPane().add(tabPane);
    this.setSize(200, 200);
    this.setVisible(true);
    tabPane.addChangeListener(new TabChangeListener());
    tabPane.setSelectedIndex(1);
    tabPane.setSelectedIndex(0);
    public static void main(String[] args) {
    TabBackgroundChange tabBackgroundChange1 = new TabBackgroundChange();
    private class TabChangeListener implements ChangeListener {
    public void stateChanged(ChangeEvent ce) {
    int iSelTab = tabPane.getSelectedIndex();
    Color unSelectedBackground = tabPane.getBackgroundAt(iSelTab);
    for(int i=0; i<tabPane.getTabCount(); i++) {
    tabPane.setBackgroundAt(i, unSelectedBackground);
    tabPane.setBackgroundAt(iSelTab, Color.red);
    }

  • Closable Tab in JTabbedPane

    Hi
    I trying to develop a Closable Tab in JTabbedPane. The close button should appear after/before the tab title all the time (like in JBuilder IDE).
    I know the trick where close button appears when the mouse is in that area, but i want it to be displayed all the time irrespective of the mouse position.
    How i should be able to create this component??
    I am very new to swing please help...
    Thanks for your help...
    -Vinod

    Thanks Stas,
    Your code was really helpfull.
    I've improved it a litte bit. So I'd like to share It.
    To use it, just create a ClosableTabbedPane.
    If you need to change the default action (remove the tab) then use the method setCloseTabAction(CloseTabAction) to change the action.
    Cheers,
    Rafa
    ================================
    The TabbedPaneUI
    ================================
    import java.awt.Color;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.plaf.basic.BasicTabbedPaneUI;
    public class ClosableTabbedPaneUI extends BasicTabbedPaneUI
         public final static int BUTTON_SIZE = 12;
         public final static int BORDER_SIZE = 3;
         public ClosableTabbedPaneUI()
              super();
         protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
              super.paintTab(g,tabPlacement,rects,tabIndex,iconRect,textRect);
              Rectangle rect=rects[tabIndex];
              int yPosition = (rect.height-BUTTON_SIZE)/2;
              int xPosition = rect.x+rect.width-Math.round(BUTTON_SIZE*1.5f);
              g.setColor(Color.BLACK);
              g.drawRect(xPosition,yPosition,BUTTON_SIZE,BUTTON_SIZE);
              g.setColor(Color.black);
              g.drawLine(xPosition+BORDER_SIZE,yPosition+BORDER_SIZE,xPosition+BUTTON_SIZE-BORDER_SIZE,yPosition-BORDER_SIZE+BUTTON_SIZE);
              g.drawLine(xPosition+BORDER_SIZE,yPosition-BORDER_SIZE+BUTTON_SIZE,xPosition+BUTTON_SIZE-BORDER_SIZE,yPosition+BORDER_SIZE);
         protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
              return super.getTabLabelShiftX(tabPlacement, tabIndex, isSelected)-BUTTON_SIZE;     
         protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
              return super.calculateTabWidth(tabPlacement,tabIndex,metrics)+BUTTON_SIZE;
         protected MouseListener createMouseListener()
              return new MyMouseHandler();
         class MyMouseHandler extends MouseHandler
              public MyMouseHandler()
                   super();
              public void mouseClicked(MouseEvent e)
                   int x=e.getX();
                   int y=e.getY();
                   int tabIndex=-1;
                   int tabCount = tabPane.getTabCount();
                   for (int i = 0; i < tabCount; i++)
                        if (rects[ i ].contains(x, y))
                             tabIndex= i;
                             break;
                   if (tabIndex >= 0)
                        Rectangle rect = rects[tabIndex];
                        int yPosition = (rect.height-BUTTON_SIZE)/2;
                        int xPosition = rect.x+rect.width-Math.round(BUTTON_SIZE*1.5f);
                        if( new Rectangle(xPosition,yPosition,BUTTON_SIZE,BUTTON_SIZE).contains(x,y))
                             if( tabPane instanceof ClosableTabbedPane )
                                  ClosableTabbedPane closableTabbedPane = (ClosableTabbedPane)tabPane;
                                  CloseTabAction closeTabAction = closableTabbedPane.getCloseTabAction();
                                  if(closeTabAction != null)
                                       closeTabAction.act(closableTabbedPane, tabIndex);
                             else
                                  // If somebody use this class as UI like setUI(new ClosableTabbedPaneUI())
                                  tabPane.removeTabAt(tabIndex);
    ======================================
    The Closable TabbedPane
    ======================================
    public class ClosableTabbedPane extends JTabbedPane
         private CloseTabAction closeTabAction = null;
         public ClosableTabbedPane()
              super();
              init();
         public ClosableTabbedPane(int arg0)
              super(arg0);
              init();
         public ClosableTabbedPane(int arg0, int arg1)
              super(arg0, arg1);
              init();
         private void init()
              setUI(new ClosableTabbedPaneUI());
              closeTabAction = new CloseTabAction()
                   public void act(ClosableTabbedPane closableTabbedPane, int tabIndex)
                        closableTabbedPane.removeTabAt(tabIndex);
         public CloseTabAction getCloseTabAction()
              return closeTabAction;
         public void setCloseTabAction(CloseTabAction action)
              closeTabAction = action;
    =========================
    The Action
    =========================
    public interface CloseTabAction
         public void act(ClosableTabbedPane closableTabbedPane, int tabIndex);

  • How to set a single tab in JTabbedPane invisible

    Hello,
    I want to set only a single tab invisible out of 9 tabs in JTabbedPane. I can disable the tab but not able to set invisible.
    Thanking you in advance.

    you may use JTabbedPane.removeTabAt(int) method as long as you don't want the tab to appear & when needed use JTabbedPane.insertTabAt(String, Icon, Component, String, int) method.
    as far as i know this is only way to achieve our want. this should help you.
    regards,
    Afroze.

  • Each tab of JTabbedPane has different border color

    Is it possible for the content area of each tab in JTabbedPane to have a different border color? Selecting Tab1 highlights content area of the tabbed pane in yellow, selecting tab2 highlights it in red, etc...
    Thanks

    Thanks for the quick response splungebob. How would I get a reference to the Jpanel of a specific tab? In my case each tab will have a toolbar, so I tried setting the toolbar border yellow, but I still have the default jtabbedpane border color surrounding my yellow bordered toolbar. I would prefer to set the color on the jtabbedpane, so that way the Tab itself does not also have the border going underneath it. For instance, I don't want the border to continue underneath the "my tab" tab, as illustrated below:
       | my tab |
    |                                                  |
    |                                                  |
    ----------------------------------------------------Edited by: 816886 on Nov 30, 2010 7:53 AM

  • Focus-requests when switching tabs in JTabbedPane

    I have a tabbed pane with a JTextArea in each tab. I would like to switch focus to the corresponding area each time I select a tab or create a new one. A ChangeListener can detect tab selections and call requestFocusInWindow() on the newly chosen tab's text area.
    For some reason, the focus only switches sporadically. Sometimes the caret appears to stay, sometimes it only blinks once, and sometimes it never appears. My friend's workaround is to call requestFocusInWindow() again after the setSelectedIndex() calls, along with a Thread.sleep() delay between them. Oddly, in my test application the delay and extra focus-request call are only necessary when creating tabs automatically, rather than through a button or shortcut key.
    Does the problem lie in separate thread access on the same objects? I tried using "synchronized" to no avail, but EventQueue.invokeLater() on the focus request worked. Unfortunately, neither the delay nor invokeLater worked in all situations in my real-world application. Might this be a Swing bug, or have I missed something?
    Feel free to tinker with my test application:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    /**Creates a tabbed pane with scrollable text areas in each tab.
    * Each time a tab is created or selected, the focus should switch to the
    * text area so that the cursor appears and the user can immediately type
    * in the area.
    public class FocusTest2 extends JFrame {
         private static JTabbedPane tabbedPane = null;
         private static JTextArea[] textAreas = new JTextArea[100];
         private static int textAreasIndex = 0;
         private static JButton newTabButton = null;
         /**Creates a FocusTest2 object and automatically creates several
          * tabs to demonstrate the focus switching.  A delay between creating
          * the new tab and switching focus to it is apparently necessary to
          * successfully switch the focus.  This delay does not seem to be
          * necessary when the user fires an action to create new tabs, though.
          * @param args
         public static void main(String[] args) {
              FocusTest2 focusTest = new FocusTest2();
              focusTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              focusTest.show();
              //Opens several tabs.
              for (int i = 0; i < 4; i++) {
                   try {
                        //adding the tab should automatically invoke setFocus()
                        //through the tabbed pane's ChangeListener, but for some
                        //reason the focus often doesn't switch or at least doesn't
                        //remain in the text area.  The workaround is to pause
                        //for a moment, then call setFocus() directly
                        addTabbedPaneTab();
                        //without this delay, the focus only switches sporadically to
                        //the text area
                        Thread.sleep(100);
                        setFocus();
                        //extra delay simply for the user to view the tab additions
                        Thread.sleep(1900);
                   } catch (InterruptedException e) {
         /**Adds a new tab, titling it according to the index of its text area.
          * Using "synchronized" here doesn't seem to solve the focus problem.
         public static void addTabbedPaneTab() {
              if (textAreasIndex < textAreas.length) { //ensure that array has room
                   textAreas[textAreasIndex] = new JTextArea();
                   //title text area with index number
                   tabbedPane.addTab(
                        textAreasIndex + "",
                        new JScrollPane(textAreas[textAreasIndex]));
                   tabbedPane.setSelectedIndex(textAreasIndex++);
         /**Constructs the tabbed pane interface.
         public FocusTest2() {
              setSize(300, 300);
              tabbedPane = new JTabbedPane();
              //Action to create new tabs
              Action newTabAction = new AbstractAction("New") {
                   public void actionPerformed(ActionEvent evt) {
                        addTabbedPaneTab();
              //in my real-world application, adding new tabs via a button successfully
              //shifted the focus, but doing so via the shortcut key did not;
              //both techniques work here, though
              newTabAction.putValue(
                   Action.ACCELERATOR_KEY,
                   KeyStroke.getKeyStroke("alt T"));
              newTabAction.putValue(Action.SHORT_DESCRIPTION, "New");
              newTabAction.putValue(Action.MNEMONIC_KEY, new Integer('T'));
              newTabButton = new JButton(newTabAction);
              Container container = getContentPane();
              container.add(tabbedPane, BorderLayout.CENTER);
              container.add(newTabButton, BorderLayout.SOUTH);
              //switch focus to the newly selected tab, including newly created ones
              tabbedPane.addChangeListener(new ChangeListener() {
                   public void stateChanged(ChangeEvent evt) {
                        //note that no delay is necessary for some reason
                        setFocus();
         /**Sets the focus onto the selected tab's text area.  The cursor should
          * blink so that the user can start typing immediately.  In tests without
          * the delay during the automatic tab creation in main(), the cursor
          * sometimes only blinked once in the text area.
         public static void setFocus() {
              if (tabbedPane == null) //make sure that the tabbed Pane is valid
                   return;
              int i = tabbedPane.getSelectedIndex();
              if (i < 0) //i returns -1 if nothing selected
                   return;
              int index = Integer.parseInt(tabbedPane.getTitleAt(i));
              textAreas[index].requestFocusInWindow();
    }

    Did you ever get everything figured out with this? I have a similar problem ... which I have working, but it seems like I had to use a bunch of hacks.
    I think the problem with the mouse clicks is because each event when you click the moues (mousePressed, mouseReleased, mouseClicked) causes the tab to switch, and also these methods are called twice for some reason - for a total of 8 events giving the tab the focus instead of your textarea.
    This works, but seems aweful hacky:
         class TabMouseListener extends MouseAdapter
              private boolean switched = false;
              public void mousePressed( MouseEvent e ) { checkPop( e ); }
              //public void mouseReleased( MouseEvent e ) { checkPop( e ); }
              //public void mouseClicked( MouseEvent e ) { checkPop( e ); }
              public void checkPop( MouseEvent e )
                   if( e.isPopupTrigger() )
                        mousex = e.getX();
                        mousey = e.getY();
                        int index = tabPane.indexAtLocation( mousex, mousey );
                        if( index == -1 ) return;
                        tabMenu.show( tabPane, mousex, mousey );
                   else {
                        if( !switched )
                             switched = true;
                             e.consume();
                             int index = tabPane.indexAtLocation( e.getX(), e.getY() );
                             if( index != -1 )
                                  tabPane.setSelectedIndex( index );
                                  TabFramePanel panel = (TabFramePanel)tabPane.getComponentAt( index );
                                  if( panel != null ) panel.getInputComponent().requestFocus();
                        else {
                             switched = false;
                             TabFramePanel panel = (TabFramePanel)tabPane.getSelectedComponent();
                             if( panel != null ) panel.getInputComponent().requestFocus();
         }Do you know of a better way yet?
    Adam

  • Overriding Ctrl + Tab of JTabbedPane

    Dear All ,
    I have registered a keyboard action (ctrl+Tab key) to the
    JTabbedPane instance in my program for " Shifting TabbedPane's Tabs " . But its not working. If i register with ( Ctrl + any other key )     it working fine.     
         MY CODE:
         sm_tabpaneGUI.registerKeyboardAction(rightAction,KeyStroke.getKeyStrokejava.awt.event.KeyEvent.VK_TAB,java.awt.Event.CTRL_MASK),JComponent.WHEN_FOCUSED);
         where rightAction is an ActionListener object reference which does the necessary functionality.
    But Acc. Bug Id 4481587 they have given a workaround.
    " Edit the awt.properties files which have the focus traversal keys defined. "
    It is not working. So any other workaround would be appreciated."
    Srinivasan Samivelu
    Software Development Engineer
    BarcoNet Private Limited.
    Mailto:[email protected]
    http://www.barconet.com

    try dropping this into your app ..
    DefaultFocusManager myManager = new DefaultFocusManager(){
         public void processKeyEvent(Component focusedComponent, KeyEvent anEvent)
         // Returning when you receive CTRL-TAB makes your components able to control that key
         if (anEvent.getKeyCode() == KeyEvent.VK_TAB && (anEvent.getModifiers() & KeyEvent.CTRL_MASK) == KeyEvent.CTRL_MASK)
              return;
         super.processKeyEvent(focusedComponent,anEvent);
    FocusManager.setCurrentManager(myManager);

  • Mnemonics not diabled on disabled tab of JTabbedPane

    Does anybody know a simple way around this? I have a JTabbedPane with a disabled tab that has a mneumonic key on it. Clicking the mneumonic (ALT-T in my example) goes to the disabled tab, which defeats the purpose of having it disabled (clicking the tab with the mouse works as expected). This is obviously an overlooked bug. Running 1.4_02. Thanks in advance.
    Sample code:
    import java.awt.event.KeyEvent;
    import java.awt.BorderLayout;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JTabbedPane;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    public class TabPaneExample extends JFrame
        /** Creates a new instance of TabPaneExample */
        public TabPaneExample()
            super("TabPaneExample");
            JTabbedPane tabpane = new JTabbedPane();
            tabpane.addTab("One", new JButton("Panel One"));
            tabpane.addTab("Two", new JButton("Panel Two"));
            tabpane.setMnemonicAt(0, KeyEvent.VK_O);
            tabpane.setMnemonicAt(1, KeyEvent.VK_T);
            tabpane.setEnabledAt(1, false);
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(tabpane, BorderLayout.CENTER);
            getContentPane().add(panel, BorderLayout.CENTER);
        public static void main (String args[])
            TabPaneExample frame = new TabPaneExample();
            frame.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent e)
                    System.exit(0);     
            frame.setSize(280, 230);  
            frame.setVisible(true);
    }

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Bjtabbedpane+%2Bmnemonic+%2Bdisabled&col=javabugs&x=36&y=9

  • Urgent - How to add a new control instead of tabs in JTabbedPane

    Hi,
    Please give me an idea or a sample program for how to add a new control
    in JTabbedpane instead of tabs that means overlay any Java controls or pane
    in the tabpane empty place next to tabs

    "Urgent" is not relevant to the question. Your question is no more important than anybody elses.
    My answer in this posting show a limited solution:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=636289
    Otherwise I suggest you try using a layered pane approach:
    http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

  • How can I draw the tab of JTabbedPane as an image?(urgent)

    I would like to draw a JTabbedPane with a tab as an image or set the its size like I want.
    Any help is appreciated.

    Hi,
    you can set size the tabs by using the tabInsets key.
    Notice also the textIconGap key.
    UIDefaults ui = UIManager.getDefaults();
    ui.put("TabbedPane.tabInsets", new javax.swing.plaf.InsetsUIResource(10,10,10,10));
    "TabbedPane.textIconGap" int
    These are the keys and values connected with TabbedPane.
    If you need further customization of the tabbed pane I would suggest building your own.
    "TabbedPane.selected", Color
    "TabbedPane.tabRunOverlay" int
    "TabbedPane.tabAreaInsets" InsetsUIResource
    "TabbedPane.shadow" ColorUIResource
    "TabbedPane.selectedTabPadInsets" InsetsUIResource
    "TabbedPane.highlight" ColorUIResource
    "TabbedPane.lightHighlight" ColorUIResource
    "TabbedPane.font" FontUIResource
    "TabbedPane.foreground" ColorUIResource
    "TabbedPane.background" ColorUIResource
    "TabbedPane.focus" ColorUIResource
    "TabbedPane.darkshadow" ColorUIResource
    "TabbedPane.contentBorderInsets" InsetsUIResource
    -Michael

  • Problem with loading tabs in JTabbedpane

    Hi,
    i am new to swing programming. I have a Jtabbedpane and i remove and add different tabs depending on the page i need to load.when i call the function which removes existing tabs and adds new one,the content of my frame changes but the new tabs gets loaded only on a "mouse click".Why is this so and could i make the tabs load automatically when i call the function?
    Any help would be appreciated..I have pasted the code below.
    void Settingfunc(){
    mainPanel.remove(tabbedPane);
    tabbedPane.removeAll();
    passwdadm();
    mainPanel.add(tabbedPane);
    void passwdadm(){
    panelfin = new JPanel();
    panelfin1.setLayout(new BorderLayout());
    JComponent panel1 = new JPanel();
    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints constraints = new GridBagConstraints();
    panel1.setLayout(gridbag);
    tabbedPane.addTab("Password", bot1, panelfin,
    "Does nothing");
    final JCheckBox chkbox1 = new JCheckBox("", true);
    chkbox1.setFont(new Font("Arial",Font.PLAIN,12));
    constraints.gridx=0;
    constraints.gridy=0;
    constraints.insets.top=20;
    gridbag.setConstraints(chkbox1,constraints);
    panel1.add(chkbox1);
    JLabel lnch=new JLabel("Require password to open program");
    lnch.setFont(new Font("Arial",Font.PLAIN,12));
    constraints.gridx=1;
    constraints.anchor=GridBagConstraints.WEST;
    constraints.gridy=0;
    gridbag.setConstraints(lnch,constraints);
    panel1.add(lnch);
    panelfin.add(panel1,BorderLayout.NORTH);
    }

    1) Post code using the "formatting tags" so your original formatting is retained.
    If you only want to replace the tabs in the tabbed pane then there is no need to use:
    mainPanel.remove(tabbedPane);  // not needed
    tabbedPane.removeAll();
    passwdadm();
    mainPanel.add(tabbedPane); // not neededHowever, if for some reason you feel you need to remove/add a component to a container then you need to revalidate the container so it can layout the components correctly. Something like:
    container.remove(...)
    container.add(....)
    container.revalidate();

  • Thumbnail view of  tabs in JTabbedPane

    Hi all,
    I am doing a desktop app . In my app i am using JTabbedPane . In order to view the contents of all tabs in one shot,i need to bring the JPanel in each tab into a single frame,that contains a scrollbar.i.e,something like a thumbnail view of all the tabs.Is it possible to do so? Since i have several components like button, textbox,images,etc in each tab,and have set the layout property of the panel to null,i cannot reduce the size of the panel to thumbnail size.I have set layout property of jpanel in each tab to null,because i have enabled dragging of objects like buttons,textarea,images,etc.Can anyone help me to sort out this problem.
    Thanks in advance
    Ravisenan

    Ok - you only gave iPhoto '11 - I assumed up to date
    Glad you found it anyway
    You are welcome
    LN

  • Help with disabling close icon of last opened tab in JTabbedPane

    Hello
    Would someone help me out ? I have 3 tabs opened in a JTabbedPane, each with close icon "X". I am looking for a way to tell my program: if the user closes 2 tabs and only 1 remain, disable the close icon "X" of the last opened tab so that the user is unable to close the last tab. I have searched the forum, most I have run into are how to create the close icon. Would someone give me some insight into how to go about doing this? or if you have come across a forum that discusses this, do please post the link. Also, I am using java 1.6.
    Thanks very much in advance

    On each close, look how many tabs are remaining open in the JTabbedPane (getTabCount).
    If there is only one left, set its close button to invisible. Something like this:
    if (pane.getTabCount() == 1) {
        TabCloseButton tcb = (TabCloseButton) pane.getTabComponentAt(0);
        tcb.getBtClose().setVisible(false);
    }

  • Tab Control Typedef Bug (LV 2014)

    If you have a typedef'd tab control, and you rearrange the pages in the typedef, then apply the changes, on the instances of the typedef, only the labels will be rearranged, not the contents of the pages.  Each control on the tab control will be on the same ordinal page as before.

    Paul,
    If you can post a simple example VI that shows this behavior I would be glad to take a look at to see what is going on and if this is a bug.  If it is a bug I will make a Corrective Action Request (CAR) so that this can be fixed in future iterations of LabVIEW.  The post I made earlier, that suggested this may not be a bug, referenced the help documentation for the Rearrange Pages Method. This document is linked below and states that the method is not available for Strict Type Definitions.
    http://zone.ni.com/reference/en-XX/help/371361K-01​/lvscript/tabcontrol_rearrange_pages/
    This is the LabVIEW 2013 Help documentation and as I noted in my previous post, the remark on whether or not it is available with strict type definitions in LabVIEW 2014 help was absent.  If you would be willing to post a VI that demonstrates this behavior I can try this on my computer using multiple versions of LabVIEW and ask a few colleagues to determine whether this is a bug.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • Adding tab in JTabbedPane

    I'm confused as to how to add a tab. This is the code I wrote (I got it from my textbook):
    JTabbedPane tp = new JTabbedPane();
    tp.addTab (listName, new BorderPanel());
    And this is the error I am getting:
    cannot find symbol
    symbol : method addTab(java.lang.String,BorderPanel)
    location: class javax.swing.JTabbedPane
    tp.addTab (listName, new BorderPanel());
    I've imported the following into this file:
    java.awt.*;
    javax.swing.*;
    javax.swing.border.*;

    Read the JTabbedPane API for a description of all the methods and the parameters they accept.
    You will also find a link to the Swing tutorial on "How to Use Tabbed Panes" which has a working example.

Maybe you are looking for