-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0, 1.2.1, 1.2.2
-
beta
-
generic, x86
-
generic, windows_nt
Name: rk38400 Date: 11/10/98
/*
Drag a Windows L&F toolbar to create a floating
window. When you close the floating window, the
toolbar will return to the NORTH location of
the parent container instead of the originating
location.
The code below demonstrates the problem. Drag the
toolbar that contains the button Press Me Also off
and then close the window. It will show up under
the NORTH toolbar.
I havn't looked at the code to find the problem,
sorry.
*/
import java.awt.*;
import javax.swing.*;
public class toolbarBug {
public static void main(String args[]) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception e) {}
// create something to hold toolbars
JFrame frame = new JFrame();
frame.getContentPane().setLayout(new BorderLayout());
// create some toolbars
JToolBar tb1 = new JToolBar();
JToolBar tb2 = new JToolBar();
tb1.add(new JButton("Press Me"));
tb2.add(new JButton("Press Me Also"));
// add the toolbars to the frame
frame.getContentPane().add(tb1, BorderLayout.NORTH);
frame.getContentPane().add(tb2, BorderLayout.WEST);
// show the frame
frame.show();
}
}
(Review ID: 42422)
======================================================================
Name: krT82822 Date: 08/16/99
When a JToolbar is detached and then reattached to a container, it will always be placed NORTH regardless of where it was detached from. It should, either be placed where it was detached from last, or at least where it was placed initially. I have a panel where it looks really bad for a toolbar being on the top of the screen.
(Review ID: 93969)
======================================================================
- duplicates
-
JDK-4292068 Vertical JToolBar "tear off" problem re-submittion of ID 97923
-
- Closed
-