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

unix: Undocked JToolBar does not check parent window state.

XMLWordPrintable



      Name: asR10013 Date: 02/09/2000



         Code below shows JFrame with JToolbar in it. Drag out JToolBar and then
      minimize the main window. Now move toolbar by its border to the position
      where the main window was situated. JToolBar will become docked as if
      main window was not minimized.

      ----------------------------- test.java ------------------------------
      import javax.swing.*;

      class test {
         public static void main(String args[]) {
            JFrame jf = new JFrame(); // will have BorderLayout as default LayoutManager
            jf.setSize(400,300);
            JToolBar jtb = new JToolBar();
            jtb.add(new JButton("1"));
            jtb.add(new JButton("2"));
            jtb.add(new JButton("3"));
            jf.getContentPane().add(jtb);
            jf.show();
         }
      }

      ======================================================================

            apikalev Andrey Pikalev
            alssunw Als Als (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: