This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inserting JLabel into JTextPane  RSS feed

sunita reddy
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am inserting JLabel into textpane ,then i have to insert some text into documnet.i am sending my code and exceptions help me
AttributeSet attr=textPane.getCharacterAttributes();
JLabel iconLabel=new JLabel("Hello");
//iconLabel.setPreferredSize(new Dimension(20,16));
textPane.getDocument().insertString(1,"Hell0 \n",attr);
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!