Need Help With Selection Boxes

Posted on 2004-11-07
Last Modified: 2010-03-31

I'm trying to build an image editor that closely resembles Microsoft Photo Editor.  The way I have it built is that I have a JScrollPane with a JLabel on the scroll pane.  I attach the image I want to view as an icon onto the JLabel.  I want to be able to click anywhere on that icon and drag to form a selection box for cut, copy, paste operations.  I've already tried just about eveything I can think of to get it to work (including Sun's Java 2D tutorial).  Thank you for your time.
Question by:ashsaber99
    LVL 92

    Expert Comment

    what are you using for the selection box?
    LVL 92

    Accepted Solution


    Author Comment

    I'm actually trying to get it to draw the selection box.

    Author Comment

    I got it on my own, thank you for the help!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now