You are on page 1of 4

// this is selection of Extract data from DES or TDES import import import import java.awt.*; java.awt.event.*; javax.swing.*; java.io.

*;

public class Gui1_0_0 extends JFrame implements ActionListener{ JLabel label_1; JLabel label_2; JLabel label_3; JButton button_1; JLabel label_4; JButton button_2; JButton button_3; JButton button_4; public Gui1_0_0() { Gui1_0_0Layout customLayout = new Gui1_0_0Layout(); getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12)); getContentPane().setLayout(customLayout); label_1 = new JLabel("DATA SECURITY USING CRYPTOGRAPHY AND STEGANOGRAPHY "); getContentPane().add(label_1); label_2 = new JLabel("SELECT EXTRACT FOR : DES or TRIPLE DES "); getContentPane().add(label_2); label_3 = new JLabel("DES"); getContentPane().add(label_3); button_1 = new JButton("OK"); getContentPane().add(button_1); label_4 = new JLabel("TRIPLE DES"); getContentPane().add(label_4); button_2 = new JButton("OK"); getContentPane().add(button_2); button_3 = new JButton("<< BACK"); getContentPane().add(button_3); button_4 = new JButton("CANCEL"); getContentPane().add(button_4); setSize(getPreferredSize()); button_1.addActionListener(this); button_2.addActionListener(this); button_3.addActionListener(this); button_4.addActionListener(this); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }

}); } public void actionPerformed(ActionEvent e) { if (e.getSource()==button_1) // ok des { //---------------------- Call Dsteg and get the data fil e---------------------// /* Runtime r=Runtime.getRuntime(); try { Process p=r.exec("dsteg" ); System.out.println("dste g complete !"); File f=new File("dec.txt "); System.out.println("why" ); while(true) { if (f.ex ists()) break ; } } catch (Exception e1) { e1.printStackTrace(); } */ //---------------------- End of Dsteg-----------------------------------------// setVisible(false); Gui1_0_1 f2=new Gui1_0_1(); f2.setTitle("DataSecure"); f2.pack(); f2.show(); } if (e.getSource()==button_2) // ok triple des { //---------------------- Call Dsteg and get the data fil e---------------------// /* Runtime r=Runtime.getRuntime(); try { Process p=r.exec("dsteg" System.out.println("dste g complete !");

);

File f=new File("dec.txt "); System.out.println("why" ); while(true) { if (f.ex ists()) break ; } } catch (Exception e1) { e1.printStackTrace(); } */ //---------------------- End of Dsteg-----------------------------------------// setVisible(false); Gui1_0_2 f2=new Gui1_0_2(); f2.setTitle("DataSecure"); f2.pack(); f2.show(); } if (e.getSource()==button_3) // back { setVisible(false); mainframe1 win3 = new mainframe1(); win3.setTitle("DataSecure"); win3.pack(); win3.show(); } if (e.getSource()==button_4) //cancel { System.exit(1); } } public static void main(String args[]) { Gui1_0_0 window = new Gui1_0_0(); window.setTitle("DataSecure"); window.pack(); window.show(); } } class Gui1_0_0Layout implements LayoutManager { public Gui1_0_0Layout() { } public void addLayoutComponent(String name, Component comp) { }

public void removeLayoutComponent(Component comp) { } public Dimension preferredLayoutSize(Container parent) { Dimension dim = new Dimension(0, 0); Insets insets = parent.getInsets(); dim.width = 498 + insets.left + insets.right; dim.height = 384 + insets.top + insets.bottom; return dim; } public Dimension minimumLayoutSize(Container parent) { Dimension dim = new Dimension(0, 0); return dim; } public void layoutContainer(Container parent) { Insets insets = parent.getInsets(); Component c; c = parent.getComponent(0); if (c.isVisible()) {c.setBounds(insets.left+16,insets.top+8,488,32);} c = parent.getComponent(1); if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+88,360,32);} c = parent.getComponent(2); if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+176,128,24);} c = parent.getComponent(3); if (c.isVisible()) {c.setBounds(insets.left+280,insets.top+176,80,24);} c = parent.getComponent(4); if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+232,128,24);} c = parent.getComponent(5); if (c.isVisible()) {c.setBounds(insets.left+280,insets.top+232,80,24);} c = parent.getComponent(6); if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+336,88,24);} c = parent.getComponent(7); if (c.isVisible()) {c.setBounds(insets.left+384,insets.top+336,88,24);} } }

You might also like