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

    Details

    • Subcomponent:
    • Introduced In Build:
      b42
    • Introduced In Version:
      6
    • Resolved In Build:
      b66
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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();
           }

      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: