Hey guys. I'm new to GUI and am having problems on an assignment I was given. I have to make a frame and it is not working the way I'd like it to. The course I'm taking has one example, and I'm using it as a guide to help me. This is as far as I got. When I run the program, the objects appear in places that I do not want to them to appear in. I'd appreciate any and all tips to help me. Thank you
import java.awt.*; public class GUIFinal extends Frame{ GUIFinal(){ setTitle("Frame Example"); setSize(300, 300); show(); } public static void main(String[] args) { Frame f = new GUIFinal(); Button b = new Button("Button"); TextField tf = new TextField("TextField"); TextArea ta = new TextArea("TextArea"); Checkbox c = new Checkbox("Checkbox"); Label la = new Label("Label"); Scrollbar sb = new Scrollbar(); b.setBounds(10, 50, 25, 25); tf.setBounds(40, 50, 50, 25); ta.setBounds(20, 30, 60, 30); c.setBounds(85, 45, 25, 25); la.setBounds(25, 10, 10, 10); sb.setBounds(5, 30, 10, 30); f.add(b); f.add(tf); f.add(ta); f.add(c); f.add(la); f.add(sb); } }