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!

JMenu, icon and submenu rendering

843805Mar 20 2007 — edited Mar 20 2007
i'm having a problem setting an icon on a submenu.
when i do so, the right pointing triangle is not rendered.

1: "sendTo" item correctly renders arrow.
File
SendTo |>

2: "SendTo" item displays icon, but no arrow
File
* SendTo

anyone else have this problem? i originally thought the size might be the problem but i tried giving it lots of room and no luck.
i notice the Basic??UI code has a parameter for rendering the arrowIcon but i don't see how setting an icon would affect it. maybe something in the XP??UI code.

code example:
Jmenu menu = new JMenu();
JMenu submenu = new JMenu();
// add some menu items to submenu etc...
submenu.setIcon(icon);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2007
Added on Mar 20 2007
2 comments
203 views