librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit d54955831f66c438b37809bd27107e0121aec6bd
parent 7e186ef75cd4c546c4993be59e1fdec1fc5c9237
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Fri, 12 May 2023 16:26:46 +0200

Create RulesUI

Diffstat:
Mnbproject/private/private.xml | 6+++++-
Asrc/view/RulesUI.form | 35+++++++++++++++++++++++++++++++++++
Asrc/view/RulesUI.java | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 106 insertions(+), 1 deletion(-)

diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml @@ -2,6 +2,10 @@ <project-private xmlns="http://www.netbeans.org/ns/project-private/1"> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> - <group/> + <group> + <file>file:/home/michael/Projects/PAT/librejack/src/view/StatisticsUI.java</file> + <file>file:/home/michael/Projects/PAT/librejack/src/view/RulesUI.java</file> + <file>file:/home/michael/Projects/PAT/librejack/src/view/MenuUI.java</file> + </group> </open-files> </project-private> diff --git a/src/view/RulesUI.form b/src/view/RulesUI.form @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="400" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="300" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> +</Form> diff --git a/src/view/RulesUI.java b/src/view/RulesUI.java @@ -0,0 +1,66 @@ +package view; + +import com.formdev.flatlaf.FlatDarkLaf; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +/** + * GUI to display the rules of the game + * + * @author Michael Neuper + * <a href="mailto:michael@michaelneuper.com">michael@michaelneuper.com</a> + */ +public class RulesUI extends javax.swing.JFrame { + + /** + * Creates new form RulesUI + */ + public RulesUI() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the FlatDarkLaf look and feel */ + try { + UIManager.setLookAndFeel(new FlatDarkLaf()); + } catch (UnsupportedLookAndFeelException e) { + System.err.println(e); + } + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(() -> { + new RulesUI().setVisible(true); + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +}