title: Set size of java element using AWT
body: <p>I am new to java. I have started learning java 1 day ago.. I am background of c++ (not very good 1 year of intermadiate exp). In java we have started Gui programming. So i would like to ask you how can i set size of java components (button textbox radiobutton etc..) <strong>using only AWT library</strong>. I dont want to use <strong>swing library</strong> because the my teacher has not speak about this yet. Give me simple example.</p>
  
  <p>I am trying something like this:</p>
  
  <pre><code>import java.awt.*;
  import java.awt.Color;
  class java0{
      public static void main (String argv[]){
          int a,b,c;
          Color CCC = Color.decode("#ff4500");
  
          Frame window = new Frame("First window");
  
          Panel cont = new Panel();
          cont.setBackground(CCC);
  
          TextField txfld = new TextField();
  
          Button btn = new Button("Run");
          btn.setSize(200,200); //this is not working..
          btn.setLocation(50,50);//neither this.
          cont.add(btn);
          window.add(cont);
          window.setSize(500,500);
          window.setLocation(400,300);
          window.setVisible(true);
      }
  }
  </code></pre>