Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2011
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. import java.awt.BorderLayout;
  2.  
  3.  
  4. public class av extends JFrame {
  5.  
  6. private JPanel contentPane;
  7. private JButton btnNewButton;
  8.  
  9. /**
  10. * Launch the application.
  11. */
  12. public static void main(String[] args) {
  13. EventQueue.invokeLater(new Runnable() {
  14. public void run() {
  15. try {
  16. av frame = new av();
  17. frame.setVisible(true);
  18. } catch (Exception e) {
  19. e.printStackTrace();
  20. }
  21. }
  22. });
  23. }
  24.  
  25. /**
  26. * Create the frame.
  27. */
  28. public av() {
  29. setTitle("Evil AV");
  30. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  31. setBounds(100, 100, 450, 300);
  32. contentPane = new JPanel();
  33. contentPane.setForeground(Color.WHITE);
  34. contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  35. setContentPane(contentPane);
  36.  
  37. btnNewButton = new JButton("Full scan");
  38.  
  39. JButton button = new JButton("Scan file");
  40. button.addActionListener(new ActionListener() {
  41. public void actionPerformed(ActionEvent arg0) {
  42. }
  43. });
  44. GroupLayout gl_contentPane = new GroupLayout(contentPane);
  45. gl_contentPane.setHorizontalGroup(
  46. gl_contentPane.createParallelGroup(Alignment.LEADING)
  47. .addGroup(Alignment.TRAILING, gl_contentPane.createSequentialGroup()
  48. .addContainerGap(257, Short.MAX_VALUE)
  49. .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
  50. .addComponent(button, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE)
  51. .addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE))
  52. .addGap(26))
  53. );
  54. gl_contentPane.setVerticalGroup(
  55. gl_contentPane.createParallelGroup(Alignment.LEADING)
  56. .addGroup(gl_contentPane.createSequentialGroup()
  57. .addGap(33)
  58. .addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
  59. .addGap(18)
  60. .addComponent(button, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
  61. .addContainerGap(121, Short.MAX_VALUE))
  62. );
  63. contentPane.setLayout(gl_contentPane);
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement