-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b42
-
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();
}
}
=========
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();
}
}