EDITED 7/27/2014
PLEASE READ HOW MY QUESTION IS THE BIT MEETS
Hi, I wanted to make an encoding in which it includes a JAVA GUI, a batch file, and a command line.
I got some of my answer from this website: Batch script of several options
Here is what I have now in my batch file [FOR EXAMPLE]:
echo.
echo Selection time!
echo.
echo 1. My father is Joe
echo 2. My mother is Audrey
echo 3. My brother is Jerry
echo 4. My elder sister is June
echo 5. My youngest sister is Awy
echo 6. Include All
echo.
:getOptions
set /p "choices=Type the number without spacing (e.g. 1,2,3): "
if not defined choices (
echo Please enter a valid option
goto getOptions
)
for %%a in (%choices%) do if %%a EQU 6 set choices=1,2,3,4,5
for %%i in (%choices%) do call :option-%%i
echo.
echo Done
pause
exit
:option-1
echo My father is Joe > Family.txt
exit /B
:option-2
echo My mother is Audrey > Family.txt
exit /B
:option-3
echo My brother is Jerry > Family.txt
exit /B
:option-4
echo My elder sister is June > Family.txt
exit /B
:option-5
echo My youngest sister is Awy > Family.txt
exit /B
, java, № 1, box # 2 № 3, , , , , "". ( 1,2,3 1,3,2 2,3,1), .
java [FOR EXAMPLE]:
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JCheckBox;
import java.awt.Window.Type;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class GUI extends JFrame {
private JPanel contentPane;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
GUI frame = new GUI();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public GUI() {
setTitle("FAMILY");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JCheckBox chckbxMyFatherIs = new JCheckBox("My Father is Joe");
chckbxMyFatherIs.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
}
});
chckbxMyFatherIs.setBounds(45, 48, 137, 23);
contentPane.add(chckbxMyFatherIs);
JCheckBox chckbxNewCheckBox = new JCheckBox("My Mother is Audrey");
chckbxNewCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
chckbxNewCheckBox.setBounds(196, 48, 198, 23);
contentPane.add(chckbxNewCheckBox);
JCheckBox chckbxNewCheckBox_1 = new JCheckBox("My Bother is Jerry");
chckbxNewCheckBox_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
chckbxNewCheckBox_1.setBounds(45, 97, 137, 23);
contentPane.add(chckbxNewCheckBox_1);
JCheckBox chckbxNewCheckBox_2 = new JCheckBox("My eldest Sister is June ");
chckbxNewCheckBox_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
chckbxNewCheckBox_2.setBounds(196, 97, 198, 23);
contentPane.add(chckbxNewCheckBox_2);
JCheckBox chckbxNewCheckBox_3 = new JCheckBox("My youngest sister is Awy");
chckbxNewCheckBox_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
chckbxNewCheckBox_3.setBounds(196, 149, 198, 23);
contentPane.add(chckbxNewCheckBox_3);
JCheckBox chckbxAll = new JCheckBox("All");
chckbxAll.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
chckbxAll.setBounds(45, 149, 97, 23);
contentPane.add(chckbxAll);
}
}
java, java GUI . , . , . , . , , . !
... , JAVA GUI?