Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   The following is my code. I am trying to utilise the borderlayout but its not working (https://www.askmehelpdesk.com/showthread.php?t=811491)

  • May 7, 2015, 06:37 AM
    JavaWannabee
    The following is my code. I am trying to utilise the borderlayout but its not working
    package force;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;

    public class Appd extends App {

    private JPanel panel;

    protected void createGUI(){
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container window=getContentPane();
    window.setLayout(new BorderLayout());
    window.add(panel=new JPanel(),BorderLayout.CENTER);
    panel.setPreferredSize(new Dimension(300,400));
    panel.add(new Button("Okay"));
    }
    }
  • May 7, 2015, 07:01 AM
    CravenMorhead
    Hi,

    I am a talented programmer but my languages are limited to c/c++/perl/SQL. What I did learn in university wasn't specific programming languages but how to learn different languages. I learned how to learn. One of the key skills is figuring out how to find out information on different classes and tenchniques. Google is your friend. [THIS] page should be helpful.

    Good luck!

  • All times are GMT -7. The time now is 03:11 AM.