Simple jButton question.
- From: tascienu@xxxxxxxxxxxx
- Date: 30 Apr 2005 11:31:13 -0700
I want a jButton to replace a selected text with the new text in a
JTextPane. How can i do that?
JTextPane p = new JTextPane;
JButton b = new JButton("Replace Text");
assume the user has selected a text... now what do i do?
b.setActionCommand( ? );
Where is a reference for all setActionCommand arguments? or can i pass
a function instead of a string?
b.setActionCommand( p.replaceSelection("New Text") ) ?
obviously, this will not work...
any hints?
.
- Prev by Date: Chat progr : printwriter problem
- Next by Date: Re: Java GUI -v- .NET Winforms ?
- Previous by thread: Chat progr : printwriter problem
- Index(es):