Update src/main/java/dev/sillyangel/calc/Calculator.java
All checks were successful
Build the Jar / build (push) Successful in 7s
All checks were successful
Build the Jar / build (push) Successful in 7s
This commit is contained in:
@@ -16,10 +16,12 @@ import javax.swing.GroupLayout;
|
|||||||
import javax.swing.GroupLayout.Alignment;
|
import javax.swing.GroupLayout.Alignment;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import com.formdev.flatlaf.FlatClientProperties;
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import dev.sillyangel.calc.themes.*;
|
import dev.sillyangel.calc.themes.*;
|
||||||
import dev.sillyangel.calc.CalculatorModes;
|
import dev.sillyangel.calc.CalculatorModes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Calculator extends JFrame implements KeyListener {
|
public class Calculator extends JFrame implements KeyListener {
|
||||||
|
|
||||||
public static String APPILCATION_VERSION = "1.0.0pre";
|
public static String APPILCATION_VERSION = "1.0.0pre";
|
||||||
@@ -50,6 +52,14 @@ public class Calculator extends JFrame implements KeyListener {
|
|||||||
System.out.println("\nangel's awesome calculator (acc) " + Calculator.getVersion());
|
System.out.println("\nangel's awesome calculator (acc) " + Calculator.getVersion());
|
||||||
System.out.println("created by angel");
|
System.out.println("created by angel");
|
||||||
System.out.println("---------------------------------");
|
System.out.println("---------------------------------");
|
||||||
|
if( SystemInfo.isMacOS ) {
|
||||||
|
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
|
||||||
|
System.setProperty( "apple.awt.application.name", "Calculator" );
|
||||||
|
System.setProperty( "apple.awt.application.appearance", "system" );
|
||||||
|
}
|
||||||
|
if( SystemInfo.isLinux ) { // why is linux different
|
||||||
|
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacDarkLaf");
|
// UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacDarkLaf");
|
||||||
|
|
||||||
@@ -474,6 +484,7 @@ public class Calculator extends JFrame implements KeyListener {
|
|||||||
}
|
}
|
||||||
private void PreferencesAction() {
|
private void PreferencesAction() {
|
||||||
System.out.println("preferences panel are open");
|
System.out.println("preferences panel are open");
|
||||||
|
|
||||||
}
|
}
|
||||||
private void aboutActionPerformed() {
|
private void aboutActionPerformed() {
|
||||||
JLabel titleLabel = new JLabel( "Angel's Awesome Calculator" );
|
JLabel titleLabel = new JLabel( "Angel's Awesome Calculator" );
|
||||||
|
|||||||
Reference in New Issue
Block a user