Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ik klik op dit scriptje:
  2. java  ProcessenApplication
  3. pause
  4. //gebruik -help voor opties en -Xlint om decrepated te bekijken
  5.  
  6. Deze roept dus deze script op:
  7. import javax.swing.UIManager;
  8. import java.awt.*;
  9. import java.awt.event.*;
  10. import java.util.*;
  11. import java.util.Date;
  12. import java.io.*;
  13. import javax.swing.*;
  14.  
  15.  
  16. public class ProcessenApplication
  17. {
  18.  
  19.   boolean packFrame = false;
  20.  
  21.   //Construct the application
  22.   public ProcessenApplication()
  23.   {
  24.     Frame1 frame = new Frame1();
  25.     //Validate frames that have preset sizes
  26.     //Pack frames that have useful preferred size info, e.g. from their layout
  27.     if (packFrame)
  28.       frame.pack();
  29.     else
  30.       frame.validate();
  31.     frame.setVisible(true);
  32.   }
  33.  
  34.   //Main method
  35.   public static void main(String[] args)
  36.   {
  37.     try
  38.     {
  39.       UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  40.     }
  41.     catch(Exception e)
  42.     {
  43.     }
  44.     new ProcessenApplication();
  45.   }
  46.  
  47. //===========================================================================
  48.  
  49.   public class Frame1 extends JFrame
  50.   {
  51.  
  52.     private static final long serialVersionUID = 6722596973205039761L;
  53.  
  54.     //Construct the frame
  55.     public Frame1()
  56.     {
  57.       try
  58.       {
  59.         jbInit();
  60.         mijnInit();
  61.       }
  62.       catch(Exception e)
  63.       {
  64.         e.printStackTrace();
  65.       }
  66.     }
  67.  
  68.     //Component initialization
  69.     private void jbInit() throws Exception          
  70.     {
  71.       this.getContentPane().setLayout(null);
  72.       this.setSize(new Dimension(300, 100));
  73.     }
  74.  
  75.     //Component initialization
  76.     private void mijnInit() throws Exception
  77.     {
  78.     }
  79.  
  80.  
  81.   }
  82.  
  83.  
  84. }
  85.  
  86.  
  87.  
  88. Frame file Script:
  89. import java.awt.*;
  90. import java.awt.event.*;
  91. import java.util.*;
  92. import java.util.Date;
  93. import java.io.*;
  94. import javax.swing.*;
  95.  
  96. public class Frame11 extends JFrame
  97. {
  98.  
  99.   //Construct the frame
  100.   public Frame11()
  101.   {
  102.     try
  103.     {
  104.       jbInit();
  105.       mijnInit();
  106.     }
  107.     catch(Exception e)
  108.     {
  109.       e.printStackTrace();
  110.     }
  111.   }
  112.  
  113.   //Component initialization
  114.   private void jbInit() throws Exception          
  115.   {
  116.     this.getContentPane().setLayout(null);
  117.     this.setSize(new Dimension(1300, 300));
  118.   }
  119.  
  120.   //Component initialization
  121.   private void mijnInit() throws Exception
  122.   {
  123.   }
  124.  
  125.  
  126. }
  127.  
  128.  
  129.  
  130. and then i have a class file from this and the frame file.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement