Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjingyu authored Apr 15, 2024
1 parent 9453f66 commit 1226c07
Show file tree
Hide file tree
Showing 37 changed files with 319 additions and 0 deletions.
Binary file added out/production/virtural bank/Entity/kids.class
Binary file not shown.
Binary file added out/production/virtural bank/Entity/parent.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/Main$1.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/Main$2.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/Main.class
Binary file not shown.
Binary file not shown.
Binary file added out/production/virtural bank/GUI/log_in/login.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added out/production/virtural bank/GUI/templete_1.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/templete_2.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/test_gui$1.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/test_gui$2.class
Binary file not shown.
Binary file added out/production/virtural bank/GUI/test_gui.class
Binary file not shown.
Binary file added out/production/virtural bank/Main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions src/Entity/kids.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package Entity;

public class kids {
}
4 changes: 4 additions & 0 deletions src/Entity/parent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package Entity;

public class parent {
}
104 changes: 104 additions & 0 deletions src/GUI/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package GUI;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import GUI.templete_1;
import GUI.templete_2;


public class Main extends JFrame {
private GridBagLayout gridBagLayout;
private GridBagConstraints gridBagConstraints;
private JPanel main_page;
private JPanel menu;
private JButton button1, button2, button3;
private JPanel current_panel;
private JPanel pg1, pg2;

public Main(templete_1 pg1,templete_2 pg2) {
super("demo");
current_panel = pg1;
this.pg1 = pg1;
this.pg2 = pg2;
Jframe_Jpanel();
navi_button();
setVisible(true);
}

public void Jframe_Jpanel(){
// 设置主窗口的标题

this.setSize(1920,1080);
menu = new JPanel();
main_page = new JPanel();
main_page.setLayout(new BorderLayout());

gridBagLayout = new GridBagLayout();
this.setLayout(gridBagLayout);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill=GridBagConstraints.BOTH;


menu.setBackground(Color.pink);
main_page.setBackground(Color.blue);


gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight =GridBagConstraints.REMAINDER;
gridBagConstraints.weightx = 0.05;
gridBagConstraints.weighty = 1;
gridBagLayout.setConstraints(menu, gridBagConstraints);

gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 0.95;
gridBagConstraints.gridheight =GridBagConstraints.REMAINDER;
gridBagLayout.setConstraints(main_page, gridBagConstraints);

this.add(main_page);
this.add(menu);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}
public void navi_button(){

button1 = new JButton("button1");
button1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

main_page.remove(current_panel);
main_page.add(pg1,BorderLayout.CENTER);
current_panel = pg1;
revalidate();
repaint();
}
});
button2 = new JButton("button2");
button2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
main_page.remove(current_panel);
main_page.add(pg2,BorderLayout.CENTER);
current_panel = pg2;
revalidate();
repaint();
}
});

menu.add(button1);
menu.add(button2);

}
public void sub_page(templete_1 pg1){

}
public static void main(String[] args) {
templete_1 page1 = new templete_1();
templete_2 page2 = new templete_2();
new Main(page1,page2);
}
}
10 changes: 10 additions & 0 deletions src/GUI/home_page/homepage_tem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.home_page;
import javax.swing.*;

public class homepage_tem extends JPanel{
private JLabel text;
public homepage_tem(){
text = new JLabel("this is templete_homepage");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/log_in/login.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.log_in;
import javax.swing.*;

public class login extends JPanel{
private JLabel text;
public login(){
text = new JLabel("this is login");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/message_page/templete_message.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.message_page;
import javax.swing.*;

public class templete_message extends JPanel{
private JLabel text;
public templete_message(){
text = new JLabel("this is login");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/setting_page/setting_page.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.setting_page;
import javax.swing.*;

public class setting_page extends JPanel{
private JLabel text;
public setting_page(){
text = new JLabel("this is login");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/shop_page/templete_shop.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.shop_page;
import javax.swing.*;

public class templete_shop extends JPanel{
private JLabel text;
public templete_shop(){
text = new JLabel("this is login");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/task_page/templete_tast.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI.task_page;
import javax.swing.*;

public class templete_tast extends JPanel{
private JLabel text;
public templete_tast(){
text = new JLabel("this is login");
add(text);
}
}
13 changes: 13 additions & 0 deletions src/GUI/templete_1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package GUI;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.Math.*;
public class templete_1 extends JPanel{
private JLabel text;
public templete_1(){
text = new JLabel("this is templete_1");
add(text);
}
}
10 changes: 10 additions & 0 deletions src/GUI/templete_2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package GUI;
import javax.swing.*;

public class templete_2 extends JPanel{
private JLabel text;
public templete_2(){
text = new JLabel("this is templete_2");
add(text);
}
}
96 changes: 96 additions & 0 deletions src/GUI/test_gui.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package GUI;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import GUI.home_page.homepage_tem;

public class test_gui extends JFrame {
private GridBagLayout gridBagLayout;
private GridBagConstraints gridBagConstraints;
private JPanel main_page;
private JPanel menu;
private JButton button1, button2;
private JPanel current_panel;

public static void main(String[] args) {
homepage_tem page1 = new homepage_tem();
new test_gui(page1);
}

public test_gui(JPanel panel) {
super("demo");
current_panel = panel;
Jframe_Jpanel();
navi_button();
setVisible(true);
}

public void Jframe_Jpanel(){
// 设置主窗口的标题

this.setSize(1920,1080);
menu = new JPanel();
main_page = new JPanel();
main_page.setLayout(new BorderLayout());

gridBagLayout = new GridBagLayout();
this.setLayout(gridBagLayout);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill=GridBagConstraints.BOTH;


menu.setBackground(Color.pink);
main_page.setBackground(Color.blue);


gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight =GridBagConstraints.REMAINDER;
gridBagConstraints.weightx = 0.05;
gridBagConstraints.weighty = 1;
gridBagLayout.setConstraints(menu, gridBagConstraints);

gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 0.95;
gridBagConstraints.gridheight =GridBagConstraints.REMAINDER;
gridBagLayout.setConstraints(main_page, gridBagConstraints);

this.add(main_page);
this.add(menu);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}
public void navi_button(){

button1 = new JButton("button1");
button1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

main_page.remove(current_panel);
main_page.add(current_panel,BorderLayout.CENTER);
revalidate();
repaint();
}
});
button2 = new JButton("button2");
button2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
main_page.remove(current_panel);
revalidate();
repaint();
}
});

menu.add(button1);
menu.add(button2);

}
public void sub_page(templete_1 pg1){

}

}
5 changes: 5 additions & 0 deletions src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
4 changes: 4 additions & 0 deletions src/data_process/write/process_data1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package data_process.write;

public class process_data1 {
}
4 changes: 4 additions & 0 deletions src/utill/read/read_file.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package utill.read;

public class read_file {
}
4 changes: 4 additions & 0 deletions src/utill/write/write_file.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package utill.write;

public class write_file {
}
11 changes: 11 additions & 0 deletions virtural bank.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

0 comments on commit 1226c07

Please sign in to comment.