Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6.  
  7.  
  8. public class NewJFrame extends javax.swing.JFrame {
  9.  
  10. /**
  11. * Creates new form NewJFrame
  12. */
  13. public NewJFrame() {
  14. initComponents();
  15. }
  16.  
  17. /**
  18. * This method is called from within the constructor to initialize the form.
  19. * WARNING: Do NOT modify this code. The content of this method is always
  20. * regenerated by the Form Editor.
  21. */
  22. @SuppressWarnings("unchecked")
  23. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  24. private void initComponents() {
  25.  
  26. jScrollPane1 = new javax.swing.JScrollPane();
  27. jPanel1 = new javax.swing.JPanel();
  28.  
  29. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  30.  
  31. jPanel1.setBackground(new java.awt.Color(255, 255, 51));
  32.  
  33. javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  34. jPanel1.setLayout(jPanel1Layout);
  35. jPanel1Layout.setHorizontalGroup(
  36. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  37. .addGap(0, 398, Short.MAX_VALUE)
  38. );
  39. jPanel1Layout.setVerticalGroup(
  40. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  41. .addGap(0, 0, Short.MAX_VALUE)
  42. );
  43.  
  44. jScrollPane1.setViewportView(jPanel1);
  45.  
  46. javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  47. getContentPane().setLayout(layout);
  48. layout.setHorizontalGroup(
  49. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  50. .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
  51. );
  52. layout.setVerticalGroup(
  53. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  54. .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
  55. );
  56.  
  57. pack();
  58. }// </editor-fold>
  59.  
  60. /**
  61. * @param args the command line arguments
  62. */
  63. public static void main(String args[]) {
  64. /* Set the Nimbus look and feel */
  65. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  66. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  67. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  68. */
  69. try {
  70. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  71. if ("Nimbus".equals(info.getName())) {
  72. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  73. break;
  74. }
  75. }
  76. } catch (ClassNotFoundException ex) {
  77. java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  78. } catch (InstantiationException ex) {
  79. java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  80. } catch (IllegalAccessException ex) {
  81. java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  82. } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  83. java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  84. }
  85. //</editor-fold>
  86.  
  87. /* Create and display the form */
  88. java.awt.EventQueue.invokeLater(new Runnable() {
  89. public void run() {
  90. new NewJFrame().setVisible(true);
  91. }
  92. });
  93. }
  94.  
  95. // Variables declaration - do not modify
  96. private javax.swing.JPanel jPanel1;
  97. private javax.swing.JScrollPane jScrollPane1;
  98. // End of variables declaration
  99. }
  100.  
  101. jPanel1Layout.setHorizontalGroup(
  102. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  103. .addGap(0, 398, Short.MAX_VALUE)
  104. );
  105. jPanel1Layout.setVerticalGroup(
  106. jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  107. .addGap(0, 100, Short.MAX_VALUE)
  108. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement