https://github.com/rtlevy/swing-fullscreen-macos
Simple Java library that allows for full screen AWT/Swing applications using macOS's native fullscreen feature.
https://github.com/rtlevy/swing-fullscreen-macos
awt eawt java mac macos swing
Last synced: 25 days ago
JSON representation
Simple Java library that allows for full screen AWT/Swing applications using macOS's native fullscreen feature.
- Host: GitHub
- URL: https://github.com/rtlevy/swing-fullscreen-macos
- Owner: rtlevy
- License: gpl-3.0
- Created: 2017-03-02T00:13:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T01:17:43.000Z (over 8 years ago)
- Last Synced: 2024-05-31T21:22:46.019Z (about 1 year ago)
- Topics: awt, eawt, java, mac, macos, swing
- Language: Java
- Size: 16.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Swing FullScreen macOS
A small Java library for making AWT/Swing applications natively full screen on macOS.
## Usage
First of all, import `FullScreenMacOS`:
import com.raphaellevy.fullscreen.FullScreenMacOS;
Once you've created a `JFrame` or other `Window`, you can enable full screen for it:FullScreenMacOS.setFullScreenEnabled(window, true);
This will add a full screen button in normal Mac fashion. *After you have made the frame visible*,
you can tell it to enter full screen:FullScreenMacOS.toggleFullScreen(fr);
If you want to check whether full screen is available (e.g. you're running macOS/OS X 10.7+),
use `FullScreenMacOS.fullScreenAvailable()`.## Building
This project uses Apache Maven 2. To build, make sure you have Maven installed and `cd` to
the project directory. Run the command `mvn install` and find the newly-created jar in the
target directory.