Vertical layout of the icon and text in a JMenu -


i try find way place icon of jmenu above text. i've seen method setcomponentorientation(..), influences horizontal order of icon , text (icon on left side, text on right - or opposite). there possibility place these parts of jmenu vertically (icon on top, text under icon)?

i'm not sure if able that. maybe page can out. http://www.java-forums.org/awt-swing/36112-adding-jpanel-jmenu-focus-issues.html have never tried adding image onto jmenu vertically. try using jpanel, , adding jmenu it, , setting layout of jpanel boxlayout

  jlabel imageforicon = new jlabel(// image path );   jpanel p = new jpanel(imageforicon);   jmenu m = new jmenu(p);   p.setlayout(new boxlayout(p, boxlayout.y_axis)); 

i not sure if work, seems possibly option consider.


Comments