Procházet zdrojové kódy

Created GUI class

Version 1.1
Supermaniac101 před 11 roky
rodič
revize
cd8a4ca3b9
19 změnil soubory, kde provedl 141 přidání a 43 odebrání
  1. 6 0
      .classpath
  2. 17 0
      .project
  3. 11 0
      .settings/org.eclipse.jdt.core.prefs
  4. 0 3
      README.md
  5. binární
      bin/GUI$1.class
  6. binární
      bin/GUI$2.class
  7. binární
      bin/GUI$3.class
  8. binární
      bin/GUI$4.class
  9. binární
      bin/GUI$5.class
  10. binární
      bin/GUI.class
  11. binární
      img/Xicon.png
  12. binární
      img/_icon.png
  13. 107 0
      src/GUI.java
  14. 0 5
      src/agenda/Act.java
  15. 0 5
      src/agenda/ActTime.java
  16. 0 9
      src/agenda/Agenda.java
  17. 0 5
      src/agenda/Artist.java
  18. 0 5
      src/agenda/Stage.java
  19. 0 11
      src/main/Main.java

+ 6 - 0
.classpath

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 17 - 0
.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Agenda</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 11 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7

+ 0 - 3
README.md

@@ -1,3 +0,0 @@
-# Festivalplanner
-
-De allercoolste code van onze opleiding #swagger #yolo # bitches

binární
bin/GUI$1.class


binární
bin/GUI$2.class


binární
bin/GUI$3.class


binární
bin/GUI$4.class


binární
bin/GUI$5.class


binární
bin/GUI.class


binární
img/Xicon.png


binární
img/_icon.png


+ 107 - 0
src/GUI.java

@@ -0,0 +1,107 @@
+import java.awt.Color;
+import java.awt.EventQueue;
+import java.awt.Frame;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+
+public class GUI {
+
+	private JFrame frame;
+
+	int posX=0,posY=0;
+	/**
+	 * Launch the application.
+	 */
+	public static void main(String[] args) {
+		EventQueue.invokeLater(new Runnable() {
+			public void run() {
+				try {
+					GUI window = new GUI();
+					window.frame.setVisible(true);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		});
+	}
+
+	/**
+	 * Create the application.
+	 */
+	public GUI() {
+		initialize();
+	}
+
+	/**
+	 * Initialize the contents of the frame.
+	 */
+	private void initialize() {
+		frame = new JFrame();
+		frame.setResizable(false);
+		frame.setBounds(100, 100, 1020, 700);
+		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+		frame.setUndecorated(true);
+		frame.getContentPane().setLayout(null);
+		
+		
+		
+		JPanel menuBarPanel = new JPanel();
+		menuBarPanel.setBackground(new Color(0, 128, 128));
+		menuBarPanel.setBounds(0, 0, 1020, 45);
+		frame.getContentPane().add(menuBarPanel);
+		menuBarPanel.addMouseListener(new MouseAdapter()
+		{
+			   public void mousePressed(MouseEvent e)
+			   {
+			      posX=e.getX();
+			      posY=e.getY();
+			   }
+			});
+		menuBarPanel.addMouseMotionListener(new MouseAdapter()
+		{
+		     public void mouseDragged(MouseEvent evt)
+		     {
+				//sets frame position when mouse dragged			
+				setLocation(evt.getXOnScreen()-posX,evt.getYOnScreen()-posY);
+							
+		     }
+		});
+		ImageIcon closeIcon = new ImageIcon("E:/Bibliotheek/Documenten/Workspaces/Agenda/img/Xicon.png");
+	    JLabel closeLabel = new JLabel(closeIcon);
+	    closeLabel.setBounds(983, 11, 18, 18);
+	    closeLabel.addMouseListener(new MouseAdapter() {
+	      public void mouseClicked(MouseEvent me) {
+	    	  frame.dispose();
+	      }
+	    });
+	    ImageIcon min = new ImageIcon("E:/Bibliotheek/Documenten/Workspaces/Agenda/img/_icon.png");
+	    JLabel minLabel = new JLabel(min);
+	    minLabel.setBounds(948, 11, 18, 18);
+	    minLabel.addMouseListener(new MouseAdapter() {
+	      public void mouseClicked(MouseEvent me) {
+	    	  frame.setState(Frame.ICONIFIED);
+	      }
+	    });
+	    menuBarPanel.setLayout(null);
+	    menuBarPanel.add(closeLabel);
+	    menuBarPanel.add(minLabel);
+	    
+		
+		
+		JPanel contentPanel = new JPanel();
+		contentPanel.setBackground(new Color(51, 160, 160));
+		contentPanel.setBounds(0, 45, 1020, 655);
+		frame.getContentPane().add(contentPanel);
+	}
+
+	protected void setLocation(int i, int j) {
+		
+		frame.setLocation(i,j);
+	}
+}

+ 0 - 5
src/agenda/Act.java

@@ -1,5 +0,0 @@
-package src.agenda;
-
-public class Act {
-
-}

+ 0 - 5
src/agenda/ActTime.java

@@ -1,5 +0,0 @@
-package src.agenda;
-
-public class ActTime {
-
-}

+ 0 - 9
src/agenda/Agenda.java

@@ -1,9 +0,0 @@
-package src.agenda;
-
-public class Agenda {
-
-    public Agenda(){
-        System.out.println("test");
-    }
-    
-}

+ 0 - 5
src/agenda/Artist.java

@@ -1,5 +0,0 @@
-package src.agenda;
-
-public class Artist {
-
-}

+ 0 - 5
src/agenda/Stage.java

@@ -1,5 +0,0 @@
-package src.agenda;
-
-public class Stage {
-
-}

+ 0 - 11
src/main/Main.java

@@ -1,11 +0,0 @@
-package src.main;
-
-import src.agenda.Agenda;
-
-public class Main {
-
-	public static void main(String[] args) {
-		new Agenda();
-	}
-
-}