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- */
61package CodeLine ;
72
8- /**
9- *
10- * @author efrai
11- */
3+ import javax .swing .ImageIcon ;
4+ import javax .swing .JLabel ;
5+ import javax .swing .JLayeredPane ;
6+ import javax .swing .JPanel ;
7+
128public class Arbol_B extends javax .swing .JFrame {
139
14- /**
15- * Creates new form Arbol_B
16- */
1710 public Arbol_B () {
1811 initComponents ();
12+ setLocationRelativeTo (null );
13+ setResizable (false );
14+ setTitle ("Arboles" );
15+
16+ String directorioActual = System .getProperty ("user.dir" );
17+ String separador = System .getProperty ("file.separator" );
18+
19+ ((JPanel )getContentPane ()).setOpaque (false );
20+ ImageIcon img = new ImageIcon (directorioActual +separador +"src/CodeLine/Images/arbolesB.png" );
21+ JLabel fondo = new JLabel (img );
22+ fondo .setBounds (-4 ,-14 ,img .getIconWidth (),img .getIconHeight ());
23+ getLayeredPane ().add (fondo ,JLayeredPane .FRAME_CONTENT_LAYER );
1924 }
2025
21- /**
22- * This method is called from within the constructor to initialize the form.
23- * WARNING: Do NOT modify this code. The content of this method is always
24- * regenerated by the Form Editor.
25- */
2626 @ SuppressWarnings ("unchecked" )
2727 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
2828 private void initComponents () {
@@ -36,7 +36,6 @@ private void initComponents() {
3636 jLabel6 = new javax .swing .JLabel ();
3737
3838 setDefaultCloseOperation (javax .swing .WindowConstants .EXIT_ON_CLOSE );
39- setPreferredSize (new java .awt .Dimension (800 , 600 ));
4039
4140 jButton1 .setText ("Regresar" );
4241 jButton1 .addActionListener (new java .awt .event .ActionListener () {
@@ -45,41 +44,57 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
4544 }
4645 });
4746
47+ jLabel1 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
48+ jLabel1 .setForeground (new java .awt .Color (255 , 255 , 255 ));
4849 jLabel1 .setText ("Los arboles-B son una generalizacion de los arboles balanceados. " );
4950
51+ jLabel2 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
52+ jLabel2 .setForeground (new java .awt .Color (255 , 255 , 255 ));
5053 jLabel2 .setText ("Estos representan basicamente un metodo de busqueda externa " );
5154
55+ jLabel3 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
56+ jLabel3 .setForeground (new java .awt .Color (255 , 255 , 255 ));
5257 jLabel3 .setText ("utilizando arboles multicaminos. En general cada nodo en un arbol " );
5358
59+ jLabel4 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
60+ jLabel4 .setForeground (new java .awt .Color (255 , 255 , 255 ));
5461 jLabel4 .setText ("de orden d contiene 2d calves como maximo y d claves como minimo. " );
5562
63+ jLabel5 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
64+ jLabel5 .setForeground (new java .awt .Color (255 , 255 , 255 ));
5665 jLabel5 .setText ("Con esto se garantiza que cada pagina este llena como minimo hasta " );
5766
67+ jLabel6 .setFont (new java .awt .Font ("Comic Sans MS" , 0 , 14 )); // NOI18N
68+ jLabel6 .setForeground (new java .awt .Color (255 , 255 , 255 ));
5869 jLabel6 .setText ("la mitad. " );
5970
6071 javax .swing .GroupLayout layout = new javax .swing .GroupLayout (getContentPane ());
6172 getContentPane ().setLayout (layout );
6273 layout .setHorizontalGroup (
6374 layout .createParallelGroup (javax .swing .GroupLayout .Alignment .LEADING )
64- .addGroup (javax .swing .GroupLayout .Alignment .TRAILING , layout .createSequentialGroup ()
65- .addContainerGap (667 , Short .MAX_VALUE )
66- .addComponent (jButton1 , javax .swing .GroupLayout .PREFERRED_SIZE , 97 , javax .swing .GroupLayout .PREFERRED_SIZE )
67- .addGap (36 , 36 , 36 ))
6875 .addGroup (layout .createSequentialGroup ()
69- .addGap (97 , 97 , 97 )
70- .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .TRAILING )
71- .addComponent (jLabel6 )
72- .addComponent (jLabel5 )
73- .addComponent (jLabel4 )
74- .addComponent (jLabel3 )
75- .addComponent (jLabel2 )
76- .addComponent (jLabel1 ))
77- .addContainerGap (javax .swing .GroupLayout .DEFAULT_SIZE , Short .MAX_VALUE ))
76+ .addContainerGap (181 , Short .MAX_VALUE )
77+ .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .LEADING )
78+ .addGroup (javax .swing .GroupLayout .Alignment .TRAILING , layout .createSequentialGroup ()
79+ .addComponent (jButton1 , javax .swing .GroupLayout .PREFERRED_SIZE , 97 , javax .swing .GroupLayout .PREFERRED_SIZE )
80+ .addGap (36 , 36 , 36 ))
81+ .addGroup (javax .swing .GroupLayout .Alignment .TRAILING , layout .createSequentialGroup ()
82+ .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .LEADING )
83+ .addComponent (jLabel6 )
84+ .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .TRAILING )
85+ .addComponent (jLabel5 )
86+ .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .LEADING )
87+ .addGroup (layout .createParallelGroup (javax .swing .GroupLayout .Alignment .TRAILING )
88+ .addComponent (jLabel3 )
89+ .addComponent (jLabel2 )
90+ .addComponent (jLabel1 ))
91+ .addComponent (jLabel4 ))))
92+ .addGap (176 , 176 , 176 ))))
7893 );
7994 layout .setVerticalGroup (
8095 layout .createParallelGroup (javax .swing .GroupLayout .Alignment .LEADING )
8196 .addGroup (javax .swing .GroupLayout .Alignment .TRAILING , layout .createSequentialGroup ()
82- .addGap ( 228 , 228 , 228 )
97+ .addContainerGap ( 255 , Short . MAX_VALUE )
8398 .addComponent (jLabel1 )
8499 .addPreferredGap (javax .swing .LayoutStyle .ComponentPlacement .RELATED )
85100 .addComponent (jLabel2 )
@@ -91,7 +106,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
91106 .addComponent (jLabel5 )
92107 .addPreferredGap (javax .swing .LayoutStyle .ComponentPlacement .RELATED )
93108 .addComponent (jLabel6 )
94- .addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED , 167 , Short . MAX_VALUE )
109+ .addGap ( 98 , 98 , 98 )
95110 .addComponent (jButton1 , javax .swing .GroupLayout .PREFERRED_SIZE , 37 , javax .swing .GroupLayout .PREFERRED_SIZE )
96111 .addGap (54 , 54 , 54 ))
97112 );
@@ -106,34 +121,7 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
106121 dispose ();
107122 }//GEN-LAST:event_jButton1ActionPerformed
108123
109- /**
110- * @param args the command line arguments
111- */
112124 public static void main (String args []) {
113- /* Set the Nimbus look and feel */
114- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
115- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
116- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
117- */
118- try {
119- for (javax .swing .UIManager .LookAndFeelInfo info : javax .swing .UIManager .getInstalledLookAndFeels ()) {
120- if ("Nimbus" .equals (info .getName ())) {
121- javax .swing .UIManager .setLookAndFeel (info .getClassName ());
122- break ;
123- }
124- }
125- } catch (ClassNotFoundException ex ) {
126- java .util .logging .Logger .getLogger (Arbol_B .class .getName ()).log (java .util .logging .Level .SEVERE , null , ex );
127- } catch (InstantiationException ex ) {
128- java .util .logging .Logger .getLogger (Arbol_B .class .getName ()).log (java .util .logging .Level .SEVERE , null , ex );
129- } catch (IllegalAccessException ex ) {
130- java .util .logging .Logger .getLogger (Arbol_B .class .getName ()).log (java .util .logging .Level .SEVERE , null , ex );
131- } catch (javax .swing .UnsupportedLookAndFeelException ex ) {
132- java .util .logging .Logger .getLogger (Arbol_B .class .getName ()).log (java .util .logging .Level .SEVERE , null , ex );
133- }
134- //</editor-fold>
135-
136- /* Create and display the form */
137125 java .awt .EventQueue .invokeLater (new Runnable () {
138126 public void run () {
139127 new Arbol_B ().setVisible (true );
0 commit comments