string - Adding formated JLabel to JList -
yesterday created class list available font in jlist , need...
string fonts[] = graphicsenvironment.getlocalgraphicsenvironment().getavailablefontfamilynames(); jlist<object> list = new jlist<object>(fonts); scrollpane = new jscrollpane(list); getcontentpane().add(scrollpane, borderlayout.center);
i started work on class creates jlabel name , format of font , gets added panel, it's supose too.
string fonts[] = graphicsenvironment.getlocalgraphicsenvironment().getavailablefontfamilynames(); ( int = 0; < fonts.length; i++ ) { jlabel lname = new jlabel((fonts[i])); font fname = new font ((fonts[i]), font.plain,18); lname.setfont(fname); mainpanel.add(lname); }
what want use jlabel format , add list reason alwasy loose format or content not display.
can advise how can join 2 , create jlist formated jlabels?
many thanks
Comments
Post a Comment