Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JButton Rotation

843807Sep 23 2009 — edited Sep 29 2009
I'm trying to rotate a JButton 90 degrees, but I can't figure out how to do it. [This image|http://www.fileden.com/files/2009/8/29/2558169/buttonLayout.png] is what I want. How would I do it? I could do vertical text if I have to, but I was hoping not to.

I tried the whole
JButton button = new JButton("Hello");
JXTransformer t = new JXTransformer(button);
t.rotate(Math.PI/2);
[thing found here|http://weblogs.java.net/blog/alexfromsun/archive/2006/07/jxtransformer_t.html], but it didn't work. It turns out that Sun never implemented that class. I've tried a bunch of other things I've found on Google, but nothing works.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2009
Added on Sep 23 2009
8 comments
485 views