• 0

[JAVA] Creating a Selection Box Area


Question

Hello,

I am trying to create a software, and bit stuck in one module.

I want my software to give the users the ability to copy contents from a web browser with their mouse. Here's what I mean.

1) The user starts the software.

2) Use the box selection tool to designate a specific spot from which the text contents will be copied.

3) Either with CTRL + C he will copy or the program will do it for him.

Here's a sample HTML table in a web browser:

1 Product Price

2 Product Price

3 Product Price

4 Product Price

5 Product Price

6 Product Price

If the user tries to copy the Products only, he can't do it, because dragging the mouse will also select Price, 2, Product, and so on.

I want to give my users a tool in the application, with which they basically will create a box around the items they want to copy, and either manually they will press CTRL + C to copy the text or the application will automatically do it.

Is it possible with JAVA?

Thanks a lot in advance!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Hello,

I am trying to create a software, and bit stuck in one module.

I want my software to give the users the ability to copy contents from a web browser with their mouse. Here's what I mean.

1) The user starts the software.

2) Use the box selection tool to designate a specific spot from which the text contents will be copied.

3) Either with CTRL + C he will copy or the program will do it for him.

Here's a sample HTML table in a web browser:

1 Product Price

2 Product Price

3 Product Price

4 Product Price

5 Product Price

6 Product Price

If the user tries to copy the Products only, he can't do it, because dragging the mouse will also select Price, 2, Product, and so on.

I want to give my users a tool in the application, with which they basically will create a box around the items they want to copy, and either manually they will press CTRL + C to copy the text or the application will automatically do it.

Is it possible with JAVA?

Thanks a lot in advance!

What's wrong with checkboxes?

Link to comment
Share on other sites

  • 0

I want my application to work for any web page, the idea is to make the application specifically copy contents from a designated highlighted or a selected box.

So, if I want to copy "What's wrong" from the phrase below:

What's with checkboxes?

wrong

I would create a square selection around What's and wrong, and the application would copy What's wrong in the clipboard or in a String variable or something.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.