⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maingui.java

📁 create the email in the server
💻 JAVA
字号:
package za.co.halo.SecureCommunications.gui.client2;
import java.awt.BorderLayout;

import java.awt.Color;
import java.awt.FlowLayout;
import java.util.Vector;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;

import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JToolBar;
import javax.swing.JTree;
import javax.swing.ListModel;
import javax.swing.WindowConstants;

import za.co.halo.SecureCommunications.Email;
import za.co.halo.SecureCommunications.gui.client2.EmailPanel;


/**
* This code was generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* *************************************
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED
* for this machine, so Jigloo or this code cannot be used legally
* for any corporate or commercial purpose.
* *************************************
*/
public class mainGui extends javax.swing.JFrame {
	private JPanel emailPanel;
	private JList emailList;
	private JTree tree;
	private JSplitPane emailsplit;
	private JSplitPane splitpane;
	private JButton jButton6;
	private JButton jButton5;
	private JButton jButton4;
	private JButton jButton3;
	private JButton jButton2;
	private JButton jButton1;
	private JToolBar emailtoolbar;
	private EmailPanel panel;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		mainGui inst = new mainGui();
		inst.setVisible(true);
	}
	private Vector<Email> getTestEmails()
	{
		Vector<String> receivers = new Vector<String>(3);
		receivers.addElement("s23152835@tuks.co.za");
		receivers.addElement("s21152835@tuks.co.za");
		receivers.addElement("rusty@tuks.co.za");
		Vector<String> message = new Vector<String>(1);
		message.addElement("If you can read this , ICAT V0.03 is up and running." +
				"Thank You for your patience");
		Vector<Email> e = new Vector<Email>(10);
		e.addElement(new Email("Something Special", "Isabel Bostha", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("Read it...", "Jeanri Pellissier", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("How's the shot going ?", "Pieter Toute", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("me - you", "Lizel van Rensburg", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("This is the life", "Jaco Pieterse", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("What do you mean", "Zelma Potgieter", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("hallo daar", "Derick van der Watt", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("jou ma", "Yolanda Swart", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("going on holiday", "Derika van Ate", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		e.addElement(new Email("Testing this", "Koos Rauter", receivers, receivers, receivers, "John McGee", message, "1:03","Anliend de Lange"));
		return e;
	}
	public mainGui() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				emailPanel = new JPanel();
				this.getContentPane().add(emailPanel, BorderLayout.CENTER);
				FlowLayout emailPanelLayout = new FlowLayout();
				emailPanel.setLayout(emailPanelLayout);
				{
					emailtoolbar = new JToolBar();
					emailPanel.add(emailtoolbar);
					emailtoolbar.setPreferredSize(new java.awt.Dimension(
						800,
						24));
					{
						jButton1 = new JButton();
						emailtoolbar.add(jButton1);
						jButton1.setText("New");
						jButton1.setBounds(91, 202, 60, 22);
					}
					{
						jButton2 = new JButton();
						emailtoolbar.add(jButton2);
						jButton2.setText("Reply");
						jButton2
							.setPreferredSize(new java.awt.Dimension(40, 30));
						jButton2.setBounds(132, 139, 66, 22);
					}
					{
						jButton3 = new JButton();
						emailtoolbar.add(jButton3);
						jButton3.setText("Reply to All");
					}
					{
						jButton4 = new JButton();
						emailtoolbar.add(jButton4);
						jButton4.setText("Forward");
					}
					{
						jButton5 = new JButton();
						emailtoolbar.add(jButton5);
						jButton5.setText("Send and Receive");
					}
					{
						jButton6 = new JButton();
						emailtoolbar.add(jButton6);
						jButton6.setText("Search");
					}
				}
				{
					splitpane = new JSplitPane();
					emailPanel.add(splitpane);
					splitpane
						.setPreferredSize(new java.awt.Dimension(800, 600));
					{
						emailsplit = new JSplitPane();
						splitpane.add(emailsplit, JSplitPane.RIGHT);
						{
							emailList = new JList();
							emailsplit.add(emailList, JSplitPane.RIGHT);
							tree = new JTree();
							splitpane.add(tree, JSplitPane.LEFT);
						}
						{

							//panel = new EmailPanel(getTestEmails());
							//panel.setSize(200,300);

							//emailsplit.add(panel, JSplitPane.RIGHT);
						}

					}
					{
						//ListModel emailListModel = new DefaultComboBoxModel(
							//new String[] { "Item One", "Item Two" });
						//tree = new JTree();
						//splitpane.add(tree, JSplitPane.LEFT);
						//tree.setModel(emailListModel);
						//tree.setBackground(new Color(15, 65, 108));
					}
				}
			}
			pack();
			setSize(800, 600);
		} catch (Exception e)
		{
			e.printStackTrace();
		}

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -