
Patrick B. answered 04/17/21
Math and computer tutor/teacher
The scope of this project is way too broad and general to do here.
You need to specify the EXACT data that needs to be collected,
what calculations need be performed, and how the data is to be stored.
I am available for free consultation and can help in the development and implementation.
In the meantime here is how you do a simple form with some check boxes and 2 buttons.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class MyPanel extends JPanel {
private JButton jcomp1;
private JButton jcomp2;
private JCheckBox chkBox;
private JCheckBox jcomp4;
public MyPanel() {
//construct components
jcomp1 = new JButton ("OK");
jcomp2 = new JButton ("NEXT");
chkBox = new JCheckBox ("Temperature Check");
jcomp4 = new JCheckBox ("Symptoms");
//adjust size and set layout
setPreferredSize (new Dimension (239, 160));
setLayout (null);
//add components
add (jcomp1);
add (jcomp2);
add (chkBox);
add (jcomp4);
//set component bounds (only needed by Absolute Positioning)
jcomp1.setBounds (20, 110, 65, 20);
jcomp2.setBounds (100, 110, 90, 20);
chkBox.setBounds (35, 30, 150, 25);
jcomp4.setBounds (40, 60, 110, 25);
}
public static void main (String[] args) {
JFrame frame = new JFrame ("MyPanel");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add (new MyPanel());
frame.pack();
frame.setVisible (true);
}
}