-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.1
-
x86
-
windows_nt
###@###.### 2002-04-23
This bug might be related to bug4662254, but this problem occurs
only with the Look and Feel Windows.
J2SE Version (please include all output from java -version flag):
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b08)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b08, mixed mode)
Does this problem occur on J2SE 1.3 or 1.4? Yes / No (pick one)
No, on 1.3 works fine and internal fame still non-actived.
on 1.4, internal fame will become actived after the first click.
on 1.4.1, nothing happen on the first click, after the frist
click, internal frame become actived then works as 1.4.
Operating System Configuration Information (be specific):
Windows NT Version 4 (SP 6) & Windows XP
Hardware Configuration Information (be specific):
Bug Description:
Nothing happens when clicking/dragging a ScrollBar owned by an
non-actived internal frame.
Test Program:
/**
* ScrollBarInternalFrameHopper.java
*/
import java.lang.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
/**
* Class: ScrollBarInternalFrameHopper
*/
public class ScrollBarInternalFrameHopper extends javax.swing.JFrame
{
/**
* Constructor: ScrollBarInternalFrameHopper
* @return instance of ScrollBarInternalFrameHopper
*/
public ScrollBarInternalFrameHopper()
{
String line = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n";
StringBuffer stream = new StringBuffer(1024);
for (int i = 0; i < 100; i++)
stream.append(line);
/* JFrame - Bean Properties */
setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
setTitle("ScrollBarInternalFrameHopper");
/* JFrame - sets Bounds */
setBounds(40,63,480,480);
/* JFrame - Adds Child */
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.setBackground(new Color(204,204,204));
getContentPane().add(desktopPane,java.awt.BorderLayout.CENTER);
/* JInternalFrame1 - Bean Properties */
JInternalFrame internalFrame = new JInternalFrame();
internalFrame.setTitle("F1");
/* JInternalFrame1 - sets Bounds */
internalFrame.setBounds(10,10,250,180);
/* JInternalFrame1 - Adds Child */
JEditorPane editor1 = new JEditorPane();
editor1.setText(stream.substring(0));
internalFrame.getContentPane().add(new JScrollPane(editor1),java.awt.BorderLayout.CENTER);
/* JDesktopPane - Adds Child */
desktopPane.add(internalFrame);
internalFrame.show();
/* JInternalFrame 2 - Bean Properties */
internalFrame = new JInternalFrame();
internalFrame.setTitle("F2");
/* JInternalFrame 2 - sets Bounds */
internalFrame.setBounds(200,200,250,180);
/* JInternalFrame 2 - Adds Child */
JEditorPane editor2 = new JEditorPane();
editor2.setText(stream.substring(0));
internalFrame.getContentPane().add(new JScrollPane(editor2),java.awt.BorderLayout.CENTER);
/* JDesktopPane - Adds Child */
desktopPane.add(internalFrame);
internalFrame.show();
} /* End of Constructor: ScrollBarInternalFrameHopper */
/**
* Method: main <br>
* Note: Called only if we're an application. <br>
* @param java.lang.String[] args the command line arguments
* @return void
*/
public static void main(java.lang.String[] args)
{
try
{
/* Set Windows look and feel */
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
/* Creates new MainObject */
ScrollBarInternalFrameHopper self = new ScrollBarInternalFrameHopper();
self.show();
} /* End try */
catch (java.lang.Throwable exc)
{
exc.printStackTrace(System.err);
} /* End catch */
} /* End of Method: main */
} /* End of Class: ScrollBarInternalFrameHopper */
- duplicates
-
JDK-4664322 focus is not transfered properly onto the JButton(SwingSet2-JInternalFrame demo)
-
- Closed
-