Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6355537

GTK LAF:Tab title is enabled while rollover on disabled tab title in tabbedpane.

XMLWordPrintable

    • b42
    • 6
    • b66
    • generic
    • generic
    • Verified

      Bug Info:
      =========
      Tab title is enabled while rollover on disabled tab title in tabbedpane.

      Scenario:
      =========
      1. Run the below source code
      2. Move the mouse over the disabled tab title.

      Expected result:
      ================
      Should not show any effect in the tab title.

      Actual result:
      ==============
      Tab title changes to enabled state while rollover on disabled tab title.


      Source code:
      ===========
      import javax.swing.*;
      import java.awt.*;

      public class TabbedPaneTest extends JFrame {

              JTabbedPane tabbedPane;
              JPanel panel;

              TabbedPaneTest() {
                 try{
                      UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
                      tabbedPane = new JTabbedPane();
                      tabbedPane.addTab("Tab 1", new JLabel("TabbedPane Test - Tab 1", JLabel.CENTER));
                      tabbedPane.addTab("Tab 2", new JLabel("TabbedPane Test - Tab 2", JLabel.CENTER));
                      tabbedPane.addTab("Tab 3", new JLabel("TabbedPane Test - Tab 3", JLabel.CENTER));
                      tabbedPane.addTab("Tab 4", new JLabel("TabbedPane Test - Tab 4", JLabel.CENTER));
                      tabbedPane.addTab("Tab 5", new JLabel("TabbedPane Test - Tab 5", JLabel.CENTER));
                      tabbedPane.setEnabled(false);
                     panel = new JPanel();
                     panel.add(tabbedPane);
                     setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                     Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                     setBounds((screenSize.width-493)/2, (screenSize.height-388)/2, 493, 388);
                     getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
                     setVisible(true);

                }catch(Exception exp){
                }
              }

            public static void main(String [] args){
                  new TabbedPaneTest();
           }

      }

            peterz Peter Zhelezniakov
            vthotasunw Vinay Thota (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: