BorderLayout WEST, EAST and CENTER regions wont display?

Hi all thanks for comments on the last post, very helpfull. I have writen this code and cant figure out why it is not displaying anything in either of the CENTER WEST OR EAST regions of the borderlayout. Sorry its a bit messy and still trying to get to grips with swing.Thx
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.UIManager;
/* FrameDemo.java requires no other files. */
public class SwingDemo {
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event-dispatching thread.
      JFrame frame1 = new JFrame("Crazyness1");
     JButton aButton1 = new JButton("PIE FACE");
     JButton aButton2 = new JButton("SHIT FACE");
     Label acNumLabel = new Label("Account Number: ");
     TextField textarea_1 = new TextField("Hello", 10);
     TextField textarea_2 = new TextField("Hello", 10);
    public SwingDemo() {
        //Create and set up the window.
        Container crazyness1 = frame1.getContentPane();
        JPanel aPanel1 = new JPanel(new BorderLayout(800,600));
        aPanel1.setPreferredSize(new Dimension(175, 100));
        crazyness1.add(aPanel1);
          FlowLayout aFLayout = new FlowLayout(1,50, 10);
        JPanel aPanel2 = new JPanel(aFLayout);
        aFLayout.setAlignment(FlowLayout.CENTER);
        FlowLayout aFLayout2 = new FlowLayout(1,10,10);
        JPanel aPanel3 = new JPanel(aFLayout2);
        aFLayout2.setAlignment(FlowLayout.CENTER);
        JPanel aPanel4 = new JPanel();
        aPanel4.setLayout(new BoxLayout(aPanel4, BoxLayout.X_AXIS));
        aPanel1.add(aPanel2,BorderLayout.SOUTH);// add extra panel to south zone
        aPanel1.add(aPanel3,BorderLayout.NORTH);
         aPanel1.add(aPanel4,BorderLayout.CENTER);
           aPanel1.add(aPanel4,BorderLayout.WEST);
        aPanel3.add(acNumLabel);//ad  label
        aPanel3.add(textarea_1);//add textarea to panel
        aPanel2.add(aButton1);
          aButton1.setMnemonic(KeyEvent.VK_I);
          aButton1.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
          textarea_1.setText("SHIT FACE");   }
        aPanel2.add(aButton2);
        aButton2.setMnemonic(KeyEvent.VK_I);
          aButton2.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
          textarea_1.setText("PIE FACE");   }
        //Display the window.
        frame1.pack();
        frame1.setVisible(true);
  public static void main(String[] args){
    new SwingDemo();
}

Just what are you trying to do here?aPanel1.add(aPanel4,BorderLayout.CENTER);
aPanel1.add(aPanel4,BorderLayout.WEST);You do realize that it doesn't make sense to add the same component twice?
Check out coding and formatting conventions at
{color:#0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
luck, db

Similar Messages

  • Copy region to page and now page wont display

    I copied a region from one page to another page .... now the page I copied the region to wont display ...... get error "page cannot be found ...." the pages that wont display has 2 regions on it ..... anytime I set the copied region to display the page will not render .... if I set only the original region on the page to display it works fine .... but anytime I try to display the copied region, I get the problem .... can anybody tell me why this may be happening ????
    thank you for your help

    Scott:
    I have enclosed some lines from the access and error logs that I think identify the issue ..... the 2 lines on either side of the asterisks (*****) below show the call to app=300 on the one hand and the error on the other .... is there any way from the error id info to determine which page item is causing the problem ???
    thank you,
    Dave .....
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:07 -0500] "GET /apex/crmprd/f?p=300:15:787230600865394 HTTP/1.1" 200 7398
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:08 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=11792032210424598&p_fname=resdev_logo.jpg HTTP/1.1" 200 39458
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:10 -0500] "POST /apex/crmprd/wwv_flow.accept HTTP/1.1" 302 5
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:11 -0500] "GET /apex/crmprd/f?p=106:1:41570779015332::NO::: HTTP/1.1" 200 8261
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:12 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=718803075501684&p_fname=Starwood_CMYK.jpg HTTP/1.1" 200 20470
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:12 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=718803075501684&p_fname=Brand_Horiz_logo.JPG HTTP/1.1" 200 18895
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:12 -0500] "GET /apex/crmprd/f?p=300:21:787230600865394::NO HTTP/1.1" 200 27397
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:13 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=11792032210424598&p_fname=resdev_logo.jpg HTTP/1.1" 200 39458
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:17 -0500] "POST /apex/crmprd/wwv_flow.accept HTTP/1.1" 302 173
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:18 -0500] "POST /apex/crmprd/wwv_flow.accept HTTP/1.1" 302 174
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:18 -0500] "GET /apex/crmprd/f?p=106:1:41570779015332::::: HTTP/1.1" 200 8244
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:19 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=718803075501684&p_fname=Starwood_CMYK.jpg HTTP/1.1" 200 20470
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:19 -0500] "GET /apex/crmprd/wwv_flow_file_mgr.get_file?p_security_group_id=718803075501684&p_fname=Brand_Horiz_logo.JPG HTTP/1.1" 200 18895
    10.29.135.130 - apex_public_user [03/Mar/2008:12:24:22 -0500] "GET /apex/crmprd/f?p=300:1:787230600865394:NEW:NO:1:: HTTP/1.1" 404 299
    [Mon Mar 03 12:24:20 2008] [error] [client 10.29.135.130] [ecid: 1204565058:10.29.0.41:4396:4532:311,0] mod_plsql: /apex/crmprd/f HTTP-404 ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "FLOWS_020200.WWV_FLOW", line 334
    ORA-06512: at "FLOWS_020200.WWV_FLOW", line 356
    ORA-06512: at "FLOWS_020200.WWV_FLOW_FORMS", line 495
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "FLOWS_020200.F", line 276
    ORA-06512: at line 10

  • My email and app notifications wont display on my home screen and my emails wont push through without manually retrieving them?

    Help please. it says to connect to itunes to activate push but it still wont work. When i open WhatsAp it loads the messages but wont tell me i have messages until i open the app.

    Hi, bjoseph1986. 
    Thank you for visiting Apple Support Communities.
    I would start with signing out of all services that require signing into your Apple ID and then signing back in.  Be sure to test the results after processing these steps.
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    If you are still experiencing the issue, backup your device via either iCloud or iTunes and restore the device.  Once this is done, restore from you backup to retrieve your data.
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Cheers,
    Jason H.

  • BorderLayout rotate east west.

    I'm a beginner, and i would like to ask if there is a way to rotate the view of a hand with cards.
    I want a hand on the north, on the south, on the west (i want to show this vertical) and the east (vertical too)
    Who can help me with this?
    this is my code so far.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * This is the BlackjackGUI window. The user can play a game of blackjack
    * through this window. The BlackjackGUI creates the players and starts the game.
    * @author Tony Sintes
    public class BlackjackGUI extends JFrame {
    public static void main( String [] args ) {
    JFrame frame = new BlackjackGUI();
    frame.getContentPane().setBackground( FOREST_GREEN );
    frame.setSize( 1024, 860 );
    frame.show();
    private BlackjackDealer dealer;
    private GUIPlayer human;
    private JPanel players = new JPanel( new BorderLayout() );
    private static final Color FOREST_GREEN = new Color( 35, 142, 35 );
    public BlackjackGUI() {
    setUp();
    WindowAdapter wa = new WindowAdapter() {
    public void windowClosing( WindowEvent e ) {
    System.exit( 0 );
    addWindowListener( wa );
    // needs to be protected if subclassed
    private PlayerView getPlayerView( Player p ) {
    PlayerView v = new PlayerView( p );
    v.setBackground( FOREST_GREEN );
    return v;
    // needs to be protected if subclassed
    private void setUp() {
    BlackjackDealer dealer = getDealer();
    PlayerView v1 = getPlayerView( dealer );
    GUIPlayer human = getHuman();
    PlayerView v2 = getPlayerView( human );
    Player safe = getSafePlayer();
    PlayerView v3 = getPlayerView(safe);
    Player onehit = getOneHitPlayer();
    PlayerView v4 = getPlayerView(onehit);
    PlayerView [] views = { v1, v2, v3, v4 };
    // addPlayers( views );
    dealer.addPlayer( human);
    dealer.addPlayer(safe);
    dealer.addPlayer(onehit);
    addOptionView( human, dealer );
    getContentPane().add(players);
    players.setBackground( FOREST_GREEN );
    players.add(v1, BorderLayout.NORTH);
    players.add(v2, BorderLayout.EAST);
    players.add(v3, BorderLayout.WEST);
    players.add(v4, BorderLayout.SOUTH);
    // needs to be protected if subclassed
    // private void addPlayers( PlayerView [] p ) {
    // players.setBackground( FOREST_GREEN );
    // for( int i = 0; i < p.length; i ++ ) {
    // players.add( p );
    // getContentPane().add( players, BorderLayout.CENTER );
    private void addOptionView( GUIPlayer human, BlackjackDealer dealer ) {
    OptionView ov = new OptionView( human, dealer );
    ov.setBackground( FOREST_GREEN );
    getContentPane().add( ov, BorderLayout.SOUTH );
    private BlackjackDealer getDealer() {
    if( dealer == null ) {
    Hand dealer_hand = new Hand();
    Deckpile cards = getCards();
    dealer = new BlackjackDealer( "Dealer", dealer_hand, cards );
    return dealer;
    private GUIPlayer getHuman() {
    if( human == null ) {
    Hand human_hand = new Hand();
    Bank bank = new Bank( 1000 );
    human = new GUIPlayer( "Human", human_hand, bank );
    return human;
    private Player getSafePlayer() {
    // lever zoveel als nodig
    Hand safe_hand = new Hand();
    Bank safe_bank = new Bank (1000);
    return new SafePlayer("Safe", safe_hand, safe_bank);
    private Player getOneHitPlayer() {
    // lever zoveel als nodig
    Hand onehit_hand = new Hand();
    Bank onehit_bank = new Bank (1000);
    return new OneHitPlayer("OneHit", onehit_hand, onehit_bank);
    private Deckpile getCards() {
    Deckpile cards = new Deckpile();
    for( int i = 0; i < 4; i ++ ) {
    cards.shuffle();
    Deck deck = new VDeck();
    deck.addToStack( cards );
    cards.shuffle();
    return cards;
    }

    [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layouts
    Maybe a BoxLayout or a GridLayout with a single column.

  • I am trying to install an update for my macbook pro retina display and my mac wont restart because it says my mail is still open but when i try and open my mail, it wont let me. I think it crashed. Help?

    I am trying to install an update for my macbook pro retina display and my mac wont restart because it says my mail is still open but when i try and open my mail, it wont let me. I think it crashed. Help?

    Go to: Apple > Force Quit
    and select Mail > Force Ouit.

  • Iphone crashed after update it wont recognise itunes when plugged in and do anything besides display itunes needs to be connected

    iphone crashed after update it wont recognise itunes when plugged in and do anything besides display itunes needs to be connected please help

    "I bought it a couple of weeks ago"
    Bought it from where? I ask because given what you have already tried, it would appear that this iPod needs either service or exchanging for another one.
    Did you buy this as new from a reputable source?

  • Next Button in a Hide and Show Region is not displayed correctly

    I created a new button at the bottom of the region in a Hide and Show Region called [Next >]. The button is displayed to the right of the region. I want it displayed at the right end of the bottom of the region. The following is the button properties
    Name
    Button Name : NEXT_SIGNS
    Text Label/Alt: Next >
    Displayed
    Sequence            130
    Display in Region: Signs and Nameplates (1) 100
    Button Position:    Bottom of Region
    Button Alignment: Right
    Attributes
    Static ID:          
    Button Style:      Template Based Button
    Button Template: PA Button
    Button Type:       Hot
    Button Attributes:
    Action When Button Clicked
    Action:                 Submit Page
    Execute Validation: Yes
    Database Action:    No Database Action
    Conditions
    None
    Security
    None
    Configuration
    NoneWhy is this occurring and how can I resolve the issue?
    The following is the template of the hide and show region:
    <div class="hide-show-region" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
      <div class="hide-show-top">
        <div class="hide-show-title">
    <div class="rounded-corner-region">
    <div class="rc-blue-top">      
    <div class="rc-blue-top-r">
              #TITLE#</div>
    </div>
    </div>
           <a style="margin-left:5px;" href="javascript:hideShow('region#REGION_SEQUENCE_ID#','shIMG#REGION_SEQUENCE_ID#','#IMAGE_PREFIX#themes/theme_2/rollup_plus_dgray.gif','#IMAGE_PREFIX#themes/theme_2/rollup_minus_dgray.gif');" class="t1HideandShowRegionLink"><img src="#IMAGE_PREFIX#themes/theme_2/rollup_plus_dgray.gif"
      id="shIMG#REGION_SEQUENCE_ID#" alt="" />Click on arrow to enter/hide  information for signs and/or nameplates</a></div>
        <div class="hide-show-buttons">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</div>
      </div>
      <div class="hide" id="region#REGION_SEQUENCE_ID#">#BODY#</div>
    </div>APEX version 4.1
    DB version 10g Rel 2
    PLEASE HELP!!
    Robert
    http://apexjscss.blogspot.com

    I created a new button at the bottom of the region in a Hide and Show Region called [Next >]. The button is displayed to the right of the region.I only see it displayed to the right of the region in Firefox (Safari and IE8 showed it above the sub-regions). Not obvious to me why this is the case (it's usually IE that does it's own thing).
    I want it displayed at the right end of the bottom of the region.Button position Bottom of Region causes an anonymous HTML table containing the button(s) to be generated after the <tt>#BODY#</tt> placeholder in the region template. Your Hide/Show region template didn't have a <tt>#SUB_REGIONS#</tt> placeholder so by default the sub-regions were rendered after the <tt>#BODY#</tt> and the "Bottom of Region" button container (don't know if this is the intended behaviour or a bug). Adding <tt>#SUB_REGIONS#</tt> before <tt>#BODY#</tt> in the template gets things in the right order (button after sub-regions):
    <div class="hide-show-region" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
      <div class="hide-show-top">
        <div class="hide-show-title">
    <div class="rounded-corner-region">
    <div class="rc-blue-top">      
    <div class="rc-blue-top-r">
              #TITLE#</div>
    </div>
    </div>
           <a style="margin-left:5px;" href="javascript:hideShow('region#REGION_SEQUENCE_ID#','shIMG#REGION_SEQUENCE_ID#','#IMAGE_PREFIX#themes/theme_2/rollup_plus_dgray.gif','#IMAGE_PREFIX#themes/theme_2/rollup_minus_dgray.gif');" class="t1HideandShowRegionLink"><img src="#IMAGE_PREFIX#themes/theme_2/rollup_plus_dgray.gif"
      id="shIMG#REGION_SEQUENCE_ID#" alt="" />Click on arrow to enter/hide  information for signs and/or nameplates</a></div>
        <div class="hide-show-buttons">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</div>
      </div>
      <div class="hide" id="region#REGION_SEQUENCE_ID#">
        #SUB_REGIONS#
        #BODY#
      </div>
    </div>Firefox is still showing the button to the right of the sub-regions. I'm assuming that this has something to do with everything in this theme being floated left (for reasons that escape me), so we'll try to clear the button container using CSS. The table doesn't have an ID or class so try an adjacent sibling selector using the ID of the preceding sub-region:
    #nameplates-name+table {
      clear: both;
    }Finally, the button alignment was set to "Left", so I changed it to "Right".
    Seems to be working in IE8 (all I have access to at present).
    Edited by: fac586 on 30-Nov-2012 20:10
    Fixed CSS selector syntax.

  • My iPhoto wont display and i cant upload pics or even look at my library. how can i fix this?

    My iPhoto wont display and i cant upload pics or even look at my library. how can i fix this?

    With the amount of information you've provided it's impossible to offer a solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    what do you see in the iPhoto window when iPhoto opens?
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    what type of Mac?
    how much free space on your boot drive?
    Come on.  Give us something to work with here.

  • I downloaded a movie from itunes on my macbook pro and it wont display a picture

    i downloaded a movie from itunes on my macbook pro and it wont display a picture
    is their any way i can redownload it??
    or is their another solution ??

    Is the movie still buffering? you may have a slow internet connection. Music files require far less bandwidth than movies.

  • Firefox wont display search results on certain engines (Google, yahoo). IE works fine and Bing also displays

    For the past 2 days, Firefox wont display search results on Google or Yahoo. Tried Bing it worked fine, tried Internet Explorer and it worked fine. All that gets displayed is a blank page, no errors or anything like that.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Nickelodeon east and west feeds

    Can we get the east and west coast feed in Oregon for Nickelodeon, instead of getting two channels with the west coast feeds?
    In Oregon we get Nickelodeon and Nick Too, witch are both the west coast feeds.
    Philip

    Your best bet for this question in Oregon is to talk to Frontier.
    Frontier takes over the reigns in Oregon in March. Verizon will no longer be providing tv service to you. So no matter what Verizon can or cannot do or is planning, really will have little if any affect on you.
    ====================================================================================
    Error exists between keyboard and chair.

  • Enable https on Apex application and now the page wont display

    Hi,
    I enabled https under security, instance on Apex application and now the page wont display. Please help because I wanted to start using https on my url

    Hi,
    I enabled https under security, instance on Apex application and now the page wont display. Please help because I wanted to start using https on my url

  • How can you get north, south, east and west from Geometry?

    Say i wanna see what places are up north, down south, to its left and to its right.
    Something like this:
    N
    O __MY PLACE__ E
    S
    I wanna know what's immediatly near (or touching)
    Feel free to use "COLA_MARKET" Example
    I am using MKT_ID: 1, 2 and 3
    What's Id is on North???, what's on east and so on.
    you know what i mean?
    thanks in advance

    Panamanian,
    Try:
    Step 1: Use SDO_UTIL.POINT_AT_BEARING to get points to the N,S,E,W of your area of interest
    Step 2: Then use SDO_ON (or SDO_ANYINTERACT) to test if there's a feature at that point.
    Regards,
    Noel

  • Drive region wont change even though i think it can

    so my drive region wont change when i put a DVD in. i know that there is still 3 changes left, because when i try to play a DVD in DVD Player, i click "file", "get disc info", "regions" tab. (it shows a region map) down where it says "drive region changes left" there is a 3 after it. so does anyone know how to fix this? thx

    Hello MrBigshot,
    It sounds like you are wanting to change the icon of the Applications folder you have in the Dock. By default the folder is shown as a Stack and so it shows you the first application icon alphabetically in as the icon in the Dock. You can make it have the Application folder icon by changing it to display as a Folder instead:
    Display as - Displays the icon in the Dock as the folder's actual icon or as a stack of icons of the folder contents.
    From: Mac Basics: Stacks
              http://support.apple.com/kb/ht3739
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • JPanel applied to BorderLayout.WEST covers BorderLayout.NORTH section, why?

    I am a newbie to swing, but thought that if you applied a panel to borderlayout.WEST, it would not overwrite another area.
    What have I missed, why has may applied panel overwritten borderlayout.NORTH?
    Many thanks.
    <code>
    import java.awt.*;
    import javax.swing.*;
    public class LayoutTest extends JPanel {
         Dimension bd = new Dimension(150,50);
         public LayoutTest(){
              setLayout(new BorderLayout());
              JPanel orderPanel = new JPanel();
              orderPanel.setLayout(new BoxLayout(orderPanel, BoxLayout.Y_AXIS));
              orderPanel.add(makeButton("rita"));
              orderPanel.add(makeButton("bob"));
              orderPanel.add(makeButton("sue"));
              add(orderPanel, BorderLayout.WEST);
         public JButton makeButton(String title) {
              JButton b = new JButton(title);
              b.setMaximumSize(bd);
              b.setMinimumSize(bd);
              b.setPreferredSize(bd);
              b.setBorder(BorderFactory.createCompoundBorder(
                                  BorderFactory.createEmptyBorder(5,5,5,5),
                                  b.getBorder()));
              b.setAlignmentX((float)0.5);
              return b;
         public static void main(String []args) throws Exception {
         JFrame f = new JFrame();
         f.setSize(600, 600);
         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f.getContentPane().add(new LayoutTest());
         f.show();
    </code>

    I see, thanks.
    I thought each area wouldn't allow you to spill over.
    So, if I don't use an area, all other components will use the space, is that right?
    If I didn't want anything to populate the NORTH area (can't think of an example why), I guess you would have to add a (any) component to it?
    Just modified LayoutTest to populate the NORTH area to, and as you said, it displayed as I initially expected.
    It's gonna take a bit of getting used to this Swing business!
    Thanks for your help.
    <code>
    import java.awt.*;
    import javax.swing.*;
    public class LayoutTest extends JPanel {
         Dimension bd = new Dimension(150,50);
         public LayoutTest(){
              setLayout(new BorderLayout());
              JPanel orderPanel = new JPanel();
              orderPanel.setLayout(new BoxLayout(orderPanel, BoxLayout.Y_AXIS));
              orderPanel.add(makeButton("rita"));
              orderPanel.add(makeButton("bob"));
              orderPanel.add(makeButton("sue"));
              JPanel orderPanel2 = new JPanel();
              orderPanel2.add(makeButton("rita"));
              orderPanel2.add(makeButton("bob"));
              orderPanel2.add(makeButton("sue"));
              add(orderPanel, BorderLayout.WEST);
              add(orderPanel2, BorderLayout.NORTH);
         public JButton makeButton(String title) {
              JButton b = new JButton(title);
              b.setMaximumSize(bd);
              b.setMinimumSize(bd);
              b.setPreferredSize(bd);
              b.setBorder(BorderFactory.createCompoundBorder(
                                  BorderFactory.createEmptyBorder(5,5,5,5),
                                  b.getBorder()));
              b.setAlignmentX((float)0.5);
              return b;
         public static void main(String []args) throws Exception {
         JFrame f = new JFrame();
         f.setSize(600, 600);
         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f.getContentPane().add(new LayoutTest());
         f.show();
    </code>

Maybe you are looking for

  • Flash Video

    I would like to know, what is the resource requirement for running a 20mb flash video. eg RAM, CPU, Video RAM. I have a system Via 1.3 processor, 1GB RAM, and 16 mb video ram (onboard) running flash 9 r115 on Linux kernel 2.6. Website: www.centeronet

  • Fujitsu fi-6130z scanner doesnt work on Windows server 2012 using Remote Fx USB Redirection

    I'm using Wyse WES7 SP1 client and using RDP, i'm connecting to RD Host Server 2012 standard edition with Remote FX enabled. scanner is able to redirect using Remote Fx and i've installed appropriate scanner driver on server. the scanner is listed in

  • JNI help - FindClass

    I have recently been trying to play around with JNI, but every time I run my program it says that it cannot locate my file (aka I get the error that it couldn't find the CTF class). I'm currently using xcode on my mac. Here is my code: * ctf.c * CTF

  • Errors:Error in parameter transfer

    Hii          I am very new to SAP and SRM as well. I am doing a scenario in which R/3 backend system that is SAPSRM5 system will SAPSRM SUS is communicating for PO to INVOICE. I done everything that is PO is reaching from R/3 to SUS and confirmation

  • Will Adobe Premiere Elements 8 meet this requirement?

    I am running MS Windows XP Professional x64 edition V2003 SP2.v4666 Dell Precision PWS670 Intel Xeon CPU 3.20GHz 3.19GHz. 3.93 GB of RAM Import video from Canon FS 200 Must export edited product to use as streaming video in Dreamweaver 8 Will Adobe P