I am trying to get a label, then next to it on the right a text area, then underneath those another label and beside that a smaller text field.
I haven't had very much luck so far. Each time I enter my second label, my first one disappears.
I'm in a java class, I haven't heard from the professor, so I thought I might have better luck here.
I hope so.
Any help would be greatly appreciated.import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.Container; public class Index extends JFrame { /** * Program Name: Index.java * Program description: This program will take a character from a user and a *line of text, * and tell how many occurrences of that character there is. */ private JTextField textInput; private FlowLayout layout; private Container container; public void actionPerformed(ActionEvent e) { } public static void main(String[] args) { JTextArea userCharFld; JPanel panel, panel1; JLabel label; JFrame mainFrame = new JFrame("Character Finder"); mainFrame.setVisible(true); mainFrame.setSize(450, 250); mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }
Thanks