Answer to Question #285679 in Java | JSP | JSF for User12345

Question #285679

Using java, Build GUI along with Jframes for university course management system

1
Expert's answer
2022-01-08T01:35:08-0500
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Management extends JFrame{
    private JButton manageButton;
    private JPanel panel;

    public Management() {
        manageButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(panel,"Done");
            }
        });
        setTitle("University course management system");
        setSize(800,600);
        setContentPane(panel);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true);
    }

    public static void main(String[] args) {
        new Management();
    }
}


<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Management">
  <grid id="27dc6" binding="panel" layout-manager="BorderLayout" hgap="0" vgap="0">
    <constraints>
      <xy x="20" y="20" width="515" height="400"/>
    </constraints>
    <properties/>
    <border type="none"/>
    <children>
      <grid id="63d72" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="0" left="0" bottom="0" right="0"/>
        <constraints border-constraint="Center"/>
        <properties/>
        <border type="none"/>
        <children>
          <component id="45531" class="javax.swing.JButton" binding="manageButton" default-binding="true">
            <constraints>
              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <text value="Manage"/>
            </properties>
          </component>
        </children>
      </grid>
    </children>
  </grid>
</form>

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog