*
The moose likes Swing / AWT / SWT and the fly likes Vertical JLable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Vertical JLable" Watch "Vertical JLable" New topic
Author

Vertical JLable

Derrick Albers
Greenhorn

Joined: Nov 01, 2010
Posts: 20
I have some code that uses VerticalUI to create a vertical JLabel. The code works great after the program is running and you replace the panel with the JLabel, but before that replace the JLabel text is normal, the UI's paint method is not called when the JLabel is created. How can I force a paint() or create a JLabel with vertical text that will show the text vertical from the beginning, I have tried calling paint(this.getGraphics,this) and the graphics object is always null???
Label Code:

VerticalUI code:
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2156
    
    7
You didn't post your simple test program that actually creates and displays the label.
Derrick Albers
Greenhorn

Joined: Nov 01, 2010
Posts: 20
It is a lot of code is why.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2156
    
    7
I didn't ask for your real application. I asked for a test frame. Its called a SSCCE.

It takes about 4 lines of code to create a JFrame. Another couple of lines of code to add a JLabel to it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vertical JLable
 
Similar Threads
Checkbox using Swing
JLabel: Code for background-painting
When I use MediaTracker , the method "paint(Graphics)" will be invoked ceaselessly!!
How to turn the text vertical in graphics?
How to build focus rectangle