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

JSplitPane does not show up properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0
    • deploy
    • x86
    • windows_nt



      Name: dbT83986 Date: 05/30/99


      I discovered that JSplitPane in the applet/plugin jre 1.2 environment does not show up, and the components of JSplitPane
      don't show up either. This behaviour exists in both Netscape and IE. After I run the applet, if I click reload the components are properly painted.

      I have created this special class just to reproduce the problem.
      Its an applet which creates a JFrame adds a JSplitPane with 2 buttons. When run as an application it works fine. When run as an applet in the plugin the buttons and the divider are not visible.

      Source code:

      import javax.swing.*;

      public class TestBug extends JApplet {

        public void init() {
          JFrame f = new JFrame();

          JButton b1 = new JButton("Button1");
          JPanel p1 = new JPanel();
          p1.add(b1);
          JButton b2 = new JButton("Button2");
          JPanel p2 = new JPanel();
          p2.add(b2);

          JSplitPane p = new JSplitPane(JSplitPane.VERTICAL_SPLIT, p1, p2);
          f.getContentPane().add(p);
          f.pack();
          f.show();
        }

        public static void main(String args[]) {
          TestBug t = new TestBug();
          t.init();
        }
      }


       I used this html file to load the applet:

      <title>Test JSplitPane bug </title>


      <!--"CONVERTED_APPLET"-->
      <!-- CONVERTER VERSION 1.0 -->
      <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
       codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0" WIDTH = 300 HEIGHT = 300>
      <PARAM NAME = CODE VALUE = "TestBug.class" >




      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
      <COMMENT>
      <EMBED type="application/x-java-applet;version=1.2"
      java_CODE = "TestBug.class"
      WIDTH = 300
      HEIGHT = 300
      pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html">
      <NOEMBED></COMMENT>

      </NOEMBED></EMBED>
      </OBJECT>
      (Review ID: 57151)
      ======================================================================

            Unassigned Unassigned
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: