-
Text selection in a JTextArea
Hi,
I am using a JTextArea to load a document, and I want to let users to select
text, not by document flow, but by rows and columns (e.g. by dragging from
the left-upper to the right-lower corner of a region) It would work kind
of like a spreadsheet. Is such possible?
Kit Hsu
khsu@treev.com
-
Re: Text selection in a JTextArea
You'll notice that JTextArea's getSelectedText() method returns a String.
Not an array of Strings, which is what you would need. Anyway, I don't
understand how your proposal would work with a non-fixed-width font, where
you don't have columns of letters.
But of course the answer to your question is not "No". It's "Sure, go ahead
and write a subclass of JTextArea that does what you want."
PC2
Kit <khsu@treev.com> wrote in message news:3a883801$1@news.devx.com...
>
> Hi,
>
> I am using a JTextArea to load a document, and I want to let users to
select
> text, not by document flow, but by rows and columns (e.g. by dragging from
> the left-upper to the right-lower corner of a region) It would work kind
> of like a spreadsheet. Is such possible?
>
> Kit Hsu
> khsu@treev.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|