Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAVA: How to use JSeparator  RSS feed

 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I would like to know how to use the JSeparator. I do codes manually so I need to add JSeparator manually. I had a look at Oracle tutes but I didn't understand that. Someone please help me. Thanks...
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Yohan!

Champ, did you look here already? I think this is what you're looking for!
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the reply. Ya I have already read that.



Is this is the code I have to have a look at ?panel.add(new JSeparator(JSeparator.VERTICAL),
BorderLayout.LINE_START);
...The thing I can't understand is, how can I set the width and height of that?
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help please!
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Yohan.

Champ, I didn't do any tests, but looking at the class' source code now, I saw that there's a method called repaint, where you can pass a Rectangle object. I think that this can solve your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!