Testing a JInternalFrame object [message #60211] |
Sun, 19 September 2004 11:05  |
Eclipse User |
|
|
|
I'm testing VE to see how it does.
I creates an internal frame (the visual class extends JInternalFrame) that
contains a single button.
I want to test this frame have visualize it. In run this as a Java Bean but
I do not get the expected result.
I only see a main window bar. When I resize the frame, it's empty. no
button.
Any idea of what's wrong ?
Fred
/*
* Created on 19 sept. 2004
*/
package com.rubis.client.windows.calculation;
import javax.swing.JInternalFrame;
import javax.swing.JButton;
/**
* @author fredatwork
*/
public class TestInternalFrame extends JInternalFrame {
private javax.swing.JPanel jContentPane = null;
private JButton jButton = null;
/**
*
*/
public TestInternalFrame() {
super();
initialize();
}
/**
* @param title
*/
public TestInternalFrame(String title) {
super(title);
initialize();
}
/**
* @param title
* @param resizable
*/
public TestInternalFrame(String title, boolean resizable) {
super(title, resizable);
initialize();
}
/**
* @param title
* @param resizable
* @param closable
*/
public TestInternalFrame(String title, boolean resizable, boolean closable)
{
super(title, resizable, closable);
initialize();
}
/**
* @param title
* @param resizable
* @param closable
* @param maximizable
*/
public TestInternalFrame(String title, boolean resizable, boolean closable,
boolean maximizable) {
super(title, resizable, closable, maximizable);
initialize();
}
/**
* @param title
* @param resizable
* @param closable
* @param maximizable
* @param iconifiable
*/
public TestInternalFrame(String title, boolean resizable, boolean closable,
boolean maximizable, boolean iconifiable) {
super(title, resizable, closable, maximizable, iconifiable);
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(300,200);
this.setContentPane(getJContentPane());
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private javax.swing.JPanel getJContentPane() {
if(jContentPane == null) {
jContentPane = new javax.swing.JPanel();
jContentPane.setLayout(new java.awt.BorderLayout());
jContentPane.add(getJButton(), java.awt.BorderLayout.CENTER); // Generated
}
return jContentPane;
}
/**
* This method initializes jButton
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("Press me"); // Generated
}
return jButton;
}
}
|
|
|
|
Re: Testing a JInternalFrame object [message #60331 is a reply to message #60259] |
Mon, 20 September 2004 11:46  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
Actually for JInternalFrame, setVisible(false) has always been the
default. Frames are meant to be invisible until explicitly shown.
--
Thanks, Rich Kulp
|
|
|
Re: Testing a JInternalFrame object [message #598577 is a reply to message #60211] |
Sun, 19 September 2004 11:30  |
Eclipse User |
|
|
|
Frederic Dernbach wrote:
> I'm testing VE to see how it does.
>
> I creates an internal frame (the visual class extends JInternalFrame) that
> contains a single button.
>
> I want to test this frame have visualize it. In run this as a Java Bean but
> I do not get the expected result.
>
> I only see a main window bar. When I resize the frame, it's empty. no
> button.
>
> Any idea of what's wrong ?
>
> Fred
For some reason the JInternalFrame's default value of the visible
property is set to false. Select your JInternalFrame class and change
the visible property to true. Then Run As->Java Bean should work fine.
- Jeff
|
|
|
Re: Testing a JInternalFrame object [message #598601 is a reply to message #60259] |
Mon, 20 September 2004 11:46  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
Actually for JInternalFrame, setVisible(false) has always been the
default. Frames are meant to be invisible until explicitly shown.
--
Thanks, Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04035 seconds