Skip to content

Code for creating a panel in java that supports "roll to zoom" and "drag to move"

Notifications You must be signed in to change notification settings

Thanasis1101/Zoomable-Java-Panel

Repository files navigation

Zoomable-Java-Panel

This repo includes an example of a Java Panel, configured in order to allow the user to zoom in and out according to the position of the mouse and move the content of the panel. The libraries used for the graphics are the java libraries AWT and Swing.

In the example code there is a picture with a map loaded in a Panel, and the user can roll the mouse to zoom in and out, or click and drag with the mouse to move through the image.

Execute

The executable jar and the required image are located in the folder Execute. So if you want to test the app you must:

  • Download the Execute folder
  • Run the jar file:
    You can run the jar either by running the Execute.bat file if you are using Windows, either by executing the command:
    java -jar Zoomable_Panel.jar from inside the Execute folder. In order for the app to run properly, the jar file and the image called "map.jpg" must be in the same folder.

Below you can see a screenshot of the app:

About

Code for creating a panel in java that supports "roll to zoom" and "drag to move"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published