Article View: borland.public.jbuilder.java.swing
Article #8781I've understood my problem but i can't fix it !
From: Velu Erwan
Date: Thu, 20 Jul 2000 00:00
Date: Thu, 20 Jul 2000 00:00
63 lines
2408 bytes
2408 bytes
I've learn about awt & swing since one week but i'm going to become crazy !
I'm using JBuilder 2 with JDK 1.1.6 or 1.1.8.
I put a JComboBox on my Frame, the JComboBox works fine !
I put a JComboBox on a Panel or JPanel or a GroupBox and my JComboBox
doesn't work fine.
When i click on it, it flashes !!!
It seems to be a problem of weight but it can resolve my problem.
Evenif i modify the value of lightWeightPopupEnable, it doesn't work !
Is it impossible to put a JComboBox on panel ? i think not, i must do a
mistake but where ?
It seems to be a simple program but .....
Here come a simple code that doesn't work as i want !
PS: Great thanks for those who wants to help me !
/ * Beginning of the code*/
package sans_titre8;
import java.awt.*;
import borland.jbcl.layout.*;
import borland.jbcl.control.*;
import com.sun.java.swing.*;
public class Frame1 extends Frame{
JPanel jPanel1 = new JPanel();
JComboBox comboDoesntWorking = new JComboBox();
XYLayout xYLayout1 = new XYLayout();
JComboBox comboWorking = new JComboBox();
void Frame ()
{ }
public Frame1() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setLayout(xYLayout1);
comboDoesntWorking.setEditable(true);
comboWorking.setEditable(true);
this.add(jPanel1, new XYConstraints(17, 15, 226, 83));
jPanel1.add(comboDoesntWorking, null);
this.add(comboWorking, new XYConstraints(248, 132, 112, 26));
comboDoesntWorking.addItem("t");
comboDoesntWorking.addItem("t");
comboWorking.addItem("t");
comboWorking.addItem("t");
}
public static void main (String args[])
{Frame1 frame = new Frame1();
frame.setSize(400,200);
frame.setVisible(true);
}
}
/* End of the code*/
Technical Details
Message-ID:
<8l777i$mco8@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,23bb6d0841df6fb9,start X-Google-Attributes: gid111d45,public From: "Velu Erwan" <erwan@mandrakesoft.com> Subject: I've understood my problem but i can't fix it ! Date: 2000/07/20 Message-ID: <8l777i$mco8@bornews.borland.com> X-Deja-AN: 648656408 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Organization: Mandrakesoft X-MSMail-Priority: Normal Reply-To: "Velu Erwan" <erwan@mandrakesoft.com> Newsgroups: borland.public.jbuilder.java.swing