JDK-4242619 : JSplitPane does not show up properly
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-05-30
  • Updated: 1999-08-12
  • Resolved: 1999-08-12
Related Reports
Duplicate :  
Description

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) 
======================================================================

Comments
WORK AROUND Name: dbT83986 Date: 05/30/99 I found no workaround to this problem. Clicking reload is not really an option for me, because I have an applet where users need to login and download data from the server. ======================================================================
11-06-2004

EVALUATION This has been fixed in Swing in 1.2.2. thomas.ball@Eng 1999-08-11
11-08-1999