Java Swing UI popup dialog custom using glasspane with flatlaf include the animation style, and drawer menu
This project library do not available in maven central. so you can install with the jar library
library/swing-glasspane-popup-1.5.0.jar
pom.xml
<dependency>
<groupId>raven.popup</groupId>
<artifactId>swing-glasspane-popup</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${basedir}/library/swing-glasspane-popup-1.5.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.4</version>
</dependency>
## libraries
- [FlatLaf](https://github.com/JFormDesigner/FlatLaf) - FlatLaf library for the modern UI design theme
- [MigLayout](https://github.com/mikaelgrev/miglayout) - MigLayout library for flexible layout management
## Sample Code
``` java
// Install with jframe
GlassPanePopup.install(jframe);
// Show glasspane popup
String action[] = {"Cancel", "OK"};
GlassPanePopup.showPopup(new SimplePopupBorder(
component,
"Sample Message",
action,
new PopupCallbackAction() {
@Override
public void action(PopupController controller, int action) {
if (action == 0) {
// action cancel
} else if (action == 1) {
// action ok
}
}
}));
name
GlassPanePopup.push(childComponent, "popupname");
GlassPanePopup.pop("popupname");
public SimplePopupBorder(Component component,
String title,
SimplePopupBorderOption option,
String[] action,
PopupCallbackAction callbackAction);
new SimplePopupBorderOption()
.setRoundBorder(30)
.setWidth(500)
.useScroll();