Wrong display of components. [message #907172] |
Mon, 03 September 2012 08:57  |
Eclipse User |
|
|
|
Hello.
Please tell me if this is a bug or intentional.
Structure of my GUI:
JPanel called "main" is added to JFrame called "application".
To JPanel "main" i've added JPanels "A" and "B".
I have such classes that describe JPanel "A" and some specific text field:
public class A extends JPanel
{
private JTextField jtf;
public A()
{
jtf = new JTextField();
...setting size and positions...
add(jtf);
}
class VerySpecificJTF extends SpecificJTF
{
public VerySpecificJTF (){}
}
}
=========class in another file===============
abstract public class SpecificJTF extends JTextField
{
...some code...
}
}
As you see, there is an inner class VerySpecificJTF .
But now I just added standard JTextField to JPanel "A". All is ok. Text field is visible both when i use Design view directly on JPanel "A" and JForm "application".
BUT when i will use this code:
public class A extends JPanel
{
private VerySpecificJTF jtf;
public A()
{
jtf = new VerySpecificJTF();
...setting size and positions...
add(jtf);
}
class VerySpecificJTF extends SpecificJTF
{
public VerySpecificJTF (){}
}
}
i dont see any VerySpecificJTF on JPanel "A" but i see it in Design view of JFrame "application". Is this proper behaviour?
[Updated on: Mon, 03 September 2012 08:58] by Moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09637 seconds