• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane

 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can i add JComboBox to JTextPane After a partcular line of text.

program:


JTextPane Message = new JTextPane();
Message.setEditable(false);

String text = "increase the size\n" +
"additional size\n"+
"\n Maximum Size: " + Value + "\n" +
"\n New Size : "+
"\n increase size?";

Message.setText(text);
I have to add a JCombobox after New Size(text).


Thanks
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it and it didn't work. So I don't think you can. You might have to split your pane into two and put the combo box between them.

Anybody else got any ideas?

CR
 
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!