Skip to main content

[JAVA2D] JSeparator

1 reply [Last post]
Anonymous

I am designing a Status bar for my app using a JPanel. I am trying to
divide the staus bar into different sections using a vertically oriented
JSeparator but for some reason it is not being drawn on the panel.
Here'e the coed where I ad all the components to the panel...any help
would be much appreciated..

public void addPanComponents(){
this.add(statusLabel);
js= new JSeparator();
this.add(js, JSeparator.VERTICAL);
js.setVisible(true);
super.add(coordLabel);
js= new JSeparator();
this.add(js, JSeparator.VERTICAL);
this.add(synchManipLabel);
js= new JSeparator();
this.add(js, JSeparator.VERTICAL);
}

David

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
John Zukowski

Not exactly a Java2D related question

Pass JSepartor.VERTICAL to the constructor of the component, not the add method
of the container.

Quoting "Braun-Friedman, David" :

> I am designing a Status bar for my app using a JPanel. I am trying to
> divide the staus bar into different sections using a vertically oriented
> JSeparator but for some reason it is not being drawn on the panel.
> Here'e the coed where I ad all the components to the panel...any help
> would be much appreciated..
>
> public void addPanComponents(){
> this.add(statusLabel);
> js= new JSeparator();
> this.add(js, JSeparator.VERTICAL);
> js.setVisible(true);
> super.add(coordLabel);
> js= new JSeparator();
> this.add(js, JSeparator.VERTICAL);
> this.add(synchManipLabel);
> js= new JSeparator();
> this.add(js, JSeparator.VERTICAL);
> }
>
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".