File src/menu/InitialDir.form changed (mode: 100644) (index 31722cb..fd333d1) |
49 |
49 |
<Group type="102" attributes="0"> |
<Group type="102" attributes="0"> |
50 |
50 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
51 |
51 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
52 |
|
<Component id="jLabel1" pref="239" max="32767" attributes="0"/> |
|
|
52 |
|
<Component id="jLabel1" pref="438" max="32767" attributes="0"/> |
53 |
53 |
<Component id="jLabel2" alignment="0" max="32767" attributes="0"/> |
<Component id="jLabel2" alignment="0" max="32767" attributes="0"/> |
54 |
54 |
<Group type="102" alignment="0" attributes="0"> |
<Group type="102" alignment="0" attributes="0"> |
55 |
55 |
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
|
56 |
|
<EmptySpace type="unrelated" max="-2" attributes="0"/> |
|
57 |
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/> |
56 |
58 |
<EmptySpace max="32767" attributes="0"/> |
<EmptySpace max="32767" attributes="0"/> |
57 |
59 |
<Component id="jButton3" min="-2" max="-2" attributes="0"/> |
<Component id="jButton3" min="-2" max="-2" attributes="0"/> |
58 |
60 |
</Group> |
</Group> |
|
72 |
74 |
<Group type="103" groupAlignment="3" attributes="0"> |
<Group type="103" groupAlignment="3" attributes="0"> |
73 |
75 |
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> |
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> |
74 |
76 |
<Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> |
<Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> |
|
77 |
|
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> |
75 |
78 |
</Group> |
</Group> |
76 |
|
<EmptySpace pref="19" max="32767" attributes="0"/> |
|
|
79 |
|
<EmptySpace max="32767" attributes="0"/> |
77 |
80 |
</Group> |
</Group> |
78 |
81 |
</Group> |
</Group> |
79 |
82 |
</DimensionLayout> |
</DimensionLayout> |
|
105 |
108 |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> |
106 |
109 |
</Events> |
</Events> |
107 |
110 |
</Component> |
</Component> |
|
111 |
|
<Component class="javax.swing.JButton" name="jButton1"> |
|
112 |
|
<Properties> |
|
113 |
|
<Property name="text" type="java.lang.String" value="Выйти"/> |
|
114 |
|
</Properties> |
|
115 |
|
<Events> |
|
116 |
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> |
|
117 |
|
</Events> |
|
118 |
|
</Component> |
108 |
119 |
</SubComponents> |
</SubComponents> |
109 |
120 |
</Container> |
</Container> |
110 |
121 |
</SubComponents> |
</SubComponents> |
File src/menu/InitialDir.java changed (mode: 100644) (index cd122a9..5edbcca) |
6 |
6 |
package menu; |
package menu; |
7 |
7 |
|
|
8 |
8 |
|
|
|
9 |
|
import java.io.File; |
9 |
10 |
import javax.swing.JFileChooser; |
import javax.swing.JFileChooser; |
10 |
11 |
|
|
11 |
12 |
/** |
/** |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
45 |
46 |
jLabel2 = new javax.swing.JLabel(); |
jLabel2 = new javax.swing.JLabel(); |
46 |
47 |
jButton2 = new javax.swing.JButton(); |
jButton2 = new javax.swing.JButton(); |
47 |
48 |
jButton3 = new javax.swing.JButton(); |
jButton3 = new javax.swing.JButton(); |
|
49 |
|
jButton1 = new javax.swing.JButton(); |
48 |
50 |
|
|
49 |
51 |
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); |
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); |
50 |
52 |
|
|
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
66 |
68 |
} |
} |
67 |
69 |
}); |
}); |
68 |
70 |
|
|
|
71 |
|
jButton1.setText("Выйти"); |
|
72 |
|
jButton1.addActionListener(new java.awt.event.ActionListener() { |
|
73 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
74 |
|
jButton1ActionPerformed(evt); |
|
75 |
|
} |
|
76 |
|
}); |
|
77 |
|
|
69 |
78 |
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
70 |
79 |
jPanel1.setLayout(jPanel1Layout); |
jPanel1.setLayout(jPanel1Layout); |
71 |
80 |
jPanel1Layout.setHorizontalGroup( |
jPanel1Layout.setHorizontalGroup( |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
73 |
82 |
.addGroup(jPanel1Layout.createSequentialGroup() |
.addGroup(jPanel1Layout.createSequentialGroup() |
74 |
83 |
.addContainerGap() |
.addContainerGap() |
75 |
84 |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
76 |
|
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE) |
|
|
85 |
|
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE) |
77 |
86 |
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
78 |
87 |
.addGroup(jPanel1Layout.createSequentialGroup() |
.addGroup(jPanel1Layout.createSequentialGroup() |
79 |
88 |
.addComponent(jButton2) |
.addComponent(jButton2) |
|
89 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
90 |
|
.addComponent(jButton1) |
80 |
91 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
81 |
92 |
.addComponent(jButton3))) |
.addComponent(jButton3))) |
82 |
93 |
.addContainerGap()) |
.addContainerGap()) |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
91 |
102 |
.addGap(18, 18, 18) |
.addGap(18, 18, 18) |
92 |
103 |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
93 |
104 |
.addComponent(jButton2) |
.addComponent(jButton2) |
94 |
|
.addComponent(jButton3)) |
|
95 |
|
.addContainerGap(19, Short.MAX_VALUE)) |
|
|
105 |
|
.addComponent(jButton3) |
|
106 |
|
.addComponent(jButton1)) |
|
107 |
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
96 |
108 |
); |
); |
97 |
109 |
|
|
98 |
110 |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
122 |
134 |
ch.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); |
ch.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); |
123 |
135 |
int ret = ch.showOpenDialog(this); |
int ret = ch.showOpenDialog(this); |
124 |
136 |
if(ret == JFileChooser.APPROVE_OPTION) { |
if(ret == JFileChooser.APPROVE_OPTION) { |
125 |
|
this.jLabel2.setText(ch.getSelectedFile().getAbsolutePath()+ "\\"); |
|
126 |
|
path = ch.getSelectedFile().getAbsolutePath()+ "\\"; |
|
|
137 |
|
path = ch.getSelectedFile().getAbsolutePath()+ File.separator; |
|
138 |
|
this.jLabel2.setText(path); |
127 |
139 |
} |
} |
128 |
140 |
else return; |
else return; |
129 |
141 |
}//GEN-LAST:event_jButton2ActionPerformed |
}//GEN-LAST:event_jButton2ActionPerformed |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
134 |
146 |
new MainMenu(path).setVisible(true); |
new MainMenu(path).setVisible(true); |
135 |
147 |
}//GEN-LAST:event_jButton3ActionPerformed |
}//GEN-LAST:event_jButton3ActionPerformed |
136 |
148 |
|
|
|
149 |
|
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed |
|
150 |
|
// exit |
|
151 |
|
System.exit(0); |
|
152 |
|
}//GEN-LAST:event_jButton1ActionPerformed |
|
153 |
|
|
137 |
154 |
public static void main(String args[]) { |
public static void main(String args[]) { |
138 |
155 |
/* Set the Nimbus look and feel */ |
/* Set the Nimbus look and feel */ |
139 |
156 |
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> |
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> |
|
... |
... |
public class InitialDir extends javax.swing.JDialog { |
167 |
184 |
} |
} |
168 |
185 |
|
|
169 |
186 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
// Variables declaration - do not modify//GEN-BEGIN:variables |
|
187 |
|
private javax.swing.JButton jButton1; |
170 |
188 |
private javax.swing.JButton jButton2; |
private javax.swing.JButton jButton2; |
171 |
189 |
private javax.swing.JButton jButton3; |
private javax.swing.JButton jButton3; |
172 |
190 |
private javax.swing.JLabel jLabel1; |
private javax.swing.JLabel jLabel1; |