BorderLayout without a center area

Hi, I'm trying to use BorderLayout, and I like how it sets up the window except for how all the examples I've seen all have a center part to it. It's that center part that I'd like to get rid of, but with certain conditions. For instance, let's say I have the following code:
(From tutorial on borderlayout)
...//Container pane = aFrame.getContentPane()...
JButton button = new JButton("Button 1 (PAGE_START)");
pane.add(button, BorderLayout.PAGE_START);
//Make the center component big, since that's the
//typical usage of BorderLayout.
//button = new JButton("Button 2 (CENTER)");
//button.setPreferredSize(new Dimension(200, 100));
//pane.add(button, BorderLayout.CENTER);
button = new JButton("Button 3 (LINE_START)");
pane.add(button, BorderLayout.LINE_START);
button = new JButton("Long-Named Button 4 (PAGE_END)");
pane.add(button, BorderLayout.PAGE_END);
button = new JButton("5 (LINE_END)");
pane.add(button, BorderLayout.LINE_END);The program I'm making can only contain 4 containers to it, not 5 (In this code the buttons act as JPanels or containers). I guess I could squish the center portion to be only like 1 pixel in width, almost diminishing it, but I'd like to get rid of it totally, having the "LINE_START" and "LINE_END" parts touching. I tried simply getting rid of the center part (I commented it out in the code above) but that just left a "hole" in the middle.
I also substituted these parameters with NORTH, SOUTH, etc but to no effect. Any suggestions would be great. Thanks.

try this variation, but center will stretch if frame is made taller.
import java.awt.*;
import javax.swing.*;
class Testing extends JFrame
  public Testing()
    setLocation(300,100);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container pane = getContentPane();
    JButton button = new JButton("Button 1 (PAGE_START)");
    pane.add(button, BorderLayout.PAGE_START);
    button = new JButton("Button 3 (LINE_START)");
    //pane.add(button, BorderLayout.LINE_START);
JPanel p = new JPanel(new GridLayout(1,2));
p.add(button);
    button = new JButton("Long-Named Button 4 (PAGE_END)");
    pane.add(button, BorderLayout.PAGE_END);
    button = new JButton("5 (LINE_END)");
    //pane.add(button, BorderLayout.LINE_END);
p.add(button);
pane.add(p,BorderLayout.CENTER);
    pack();
  public static void main(String[] args){new Testing().setVisible(true);}
}

Similar Messages

  • Is it possible to Create Material Master without Profit Center ?

    Hai,
          1) Is it possible to Create Material Master without Profit Center ? 
          2) How SAP System Validate Profit Center in material master. ? is it material Type wise ?
          3) Whether PO Order Creation,GRN & MIRO Possible for those material Master without Profit Center.?
    Kindly Explain me clearly..
    Thanks & Regards,
    Swetha

    Hi,
    Profit center is at the plant level.
    You can create material master even with out a profit center.This field will be there in the costing view and and general sales/plant data.
    while creation of the materila master if do not select these views system will not ask for that.Normally it is pertaining to the costing analysis.
    A profit center manager is held accountable for both revenues, and costs (expenses), and therefore, profits. What this means in terms of managerial responsibilities is that the manager has to drive the sales revenue generating activities which leads to cash inflows and at the same time control the cost (cash outflows) causing activities. This makes the profit center management more challenging than cost centre management. Profit center management is equivalent to running an independent business because a profit center business unit or department is treated as a distinct entity enabling revenues and expenses to be determined and its profitability to be measured.
    Business organizations may be organized in terms of profit centers where the profit center's revenues and expenses are held separate from the main company's in order to determine their profitability. Usually different profit centers are separated for accounting purposes so that the management can follow how much profit each center makes and compare their relative efficiency and profit. Examples of typical profit centers are a store, a sales organization and a consulting organization whose profitability can be measured.
    For more info,please refer
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/cc/36428094f311d2b47a006094b9b0a5/frameset.htm,
    Regards,

  • How to update profit center in posted document without profit center ?

    HI,
    I want to know,
    How to update profit center in posted document without profit center ?
    So that i can get my profit center accouting report proper.
    Thanks
    Nilesh

    There is a long story about profit center accounting. I assume you are using Classic PCA, this means you can see the PCA documents.  And the solutions is below:
         For P/L account, even you don't maintain cost element for it, if you maintain the profit center in the application (Frontend transaction), then PCA line items will be generated for this account.
        For B/S account,  if you maintain the default Profit Center with transaction 3KEH/3KEI, the PCA line items will generated for this account also.
      Hints, don't maintain default profit center for AR/AP accounts, these accounts to be treated in periodic processing.
      First, calculate the distribution/adjust by F.5D, then transfer it by 1KEK. for others account rather than AR/AP, use F.5E
    For you case, if this account is P/L account, but you don't maintain profit center in the transaction, you can maintain default profit center as B/S account in 3KEH and 3KEI, then transfer it subsequently by transaction 1KE8.
    Good Lucky!
    Flex Yang

  • Is it possible to use ERMS without Interaction Center

    Hi experts,
    We have a requirement wherein we want to receive email from our customer. The system should automatically create Service Request from Incoming Email. The Service Request should get automatically routed to the respective Orgs. The agents should be able to send emails from Service Request using Tracking ID. I understand that all this can be achieved using ERMS and Interaction Center. My concern is that we do not intend to use Interaction Center. Would it be possible to use ERMS without Interaction Center (using any business roles of Type: CRM Webclient and not IC Webclinet). Please advice.
    Regards,
    Namita
    Edited by: Namita Singh on Aug 13, 2010 7:09 AM

    Hi Harish,
    Thanks for the response. Our requirement is to create Service Request automatically as soon as an email reach the SAP system. these are external email sent by customers. But we do not have any plans of using Interaction Center. I was investigating if this can be possible at all. Any put would certainly be hlepful.
    Regards,
    Namita

  • How do I sync multiple devices on iTunes without apps that are only on an iPad Air not sync on other devices?

    How do I sync multiple devices on iTunes (iPad Air & iPhone 5) without apps that are only on an iPad Air not syncing on my iPhone 5? I have apps on the iPad that I do not want on the iPhone, but when I sync my iPhone I have apps that are on the iPad sync to it also. How do I fix this so only the apps/data on each device sync to it?

    Settings
    iTUnes and app store
    turn off automatic downloads for apps
    Then what you buy on one device only goes onto another if you want it to

  • Plant and Cost Center are not displaying in FI doc. for asset scrap ABAVN.

    Hi All,
    When we do asset retirement by Scraping using Transaction Code ABAVN, Plant and Cost center are not appearing in the FI document. But, in the master data the Plant and Cost center are assigned for the particular Asset. 
    When I see the FI document display, the fields Cost Center and Plant are blank.  Business Area and Profit Center fields are getting updated.
    Can any one help me how to get this Plant and Cost Center in the posted document.  Is there any OSS notes for this.  I am using ECC 6.0 version.
    Thanks in advance for your help.
    Regards,
    Rajesh

    Rajesh
    Aditional on me answer.
    The systemtakes not the cost center from the asset you have to assign it in OKB9 or to fill in during this posting:
    Steps
    Click on Simulate, than you see the posting screen:
    Click on the line (pk 40)
    Click on Goto and Additional account assignment and fill in the cost center whatu2019s in the master record of the asset and post
    An other option is to make a substitution to get this information

  • My control center and notification center are not showing when I swipe in there respective locations. Does anybody know why?

    My control center and notification center are not showing when I swipe in there respective locations. Does anybody know why?

    Thank you for the sugestion, but it was working fine both on the lock screen and on my home screen. I check all my settings and it is how it was from Friday, when I got the iPhone 5s. It just stop working.  The only way I can fix it is by shutting down the phone. It will work for a while, then it won't. 

  • PO created successfully using BAPI. But G/L, Cost Center are not displaying

    Hi,
    I am trying to create a purchase Order type limit order using BAPI_PO_CREATE1. PO created successfully. when I try to see the PO using ME23N transaction,in  the account assignment tab G/L and cost center are blank. In my BAPI, I am populating all the values in item and account internal tables.
    I am debugging all the time and not able to find why G/L and Cost center are not poplulating in PO.
    Pls suggest me how to finish this problem.
    Thankm,
    Ram

    Hi,
    Are you passing the update flag in POACCOUNTX table?
    regards,
    Ankur Parab

  • Reverse the document  (JV) which is posted without Profit Center.

    Dear All
    I am clearing the Customer with T-code F-32 and one of the clearing document is J/V which
    was saved without Profit Center and the same is creating the problem by showing the error :-
    Balancing field "Profit Center" in line item 004 not filled
         Message no. GLT2201
    JV Document  is specific to last year and is not allowing to reverse also in the last year  as it is asking
    for cost center/ profit center.
    Earliest Help required.
    Thanks in advance.
    Regards
    VG

    Hi Viral
    Is the Profit Center Mandatory in document splitting for your implementation ?
    If yes,
    then check the link below
    http://sapfin.blogspot.com/2009/06/issuesolution-accounting-document.html
    If pofit center is mandatory and the original document was posted without a profit center,
    You would need to contact SAP to get the original document corrected,
    and follow the steps in the above link to prevent further occurrence  of such cases.
    Regards
    Sach!n

  • How can I bind width- /-height-properties with the center area of a BorderP

    An ImageView appears in the .center of an BorderPane. When sizing to fullscreen I want this Background stretch to this .center-area.
    .center(
    UIComps.createBackground("images/background.jpg")
    .build()

    Make sure that the node you place in the center of the BorderPane is resizable with an unclamped max size (e.g. a control or layout pane) and it should automatically resize to fill the available area of the BorderPane center - no need for binding.
    Also, you can apply a css style to the region (control or layout pane) in the center of your borderpane.
    See the background image settings for -fx-background-image and -fx-background-size
    http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html

  • Report: Material, customer order, internal order,... without Profit Center

    Hello dear colleagues,
    I can remember there is following report available:
    Report where you can find out material, internal order... without Profit Center.
    Can someone tell me fuction or program please.
    Many thanks for your help.
    I am lookinf forward to your answer.
    all the best Erwin

    Hello,
    Thank you very much.
    This is it.
    I have just forgotten it.
    all the best Erwin

  • Is it possible to transport variables without the planning areas??

    Someone knows if it's possible to transport variables without the planning areas, only the variables?
    Regards
    Guilherme

    Hi,
    Yes, if the p.area is available in target system.
    Use this report: UPC_TRANSPORT_BPS_ALL
    Regards,
    Suan

  • I have an iPhone 4S-whenever I take a picture using the flash, all I get is a white blob-pictures without the flash are fine.  I tried using different cases, thinking a bounce off the case might be the problem, but the same thing happens.  Any suggestions

    I have an iphone 4s - whenever I take a picture using the flash, all I get is a white "blob".  Pictures without the flash are fine.  I thought the flash bouncing off the case might be the problem, but when I used different cases I still had the same problem.  Any suggestions?

    I have an iphone 4s - whenever I take a picture using the flash, all I get is a white "blob".  Pictures without the flash are fine.  I thought the flash bouncing off the case might be the problem, but when I used different cases I still had the same problem.  Any suggestions?

  • My Initials for Game Center are displaying as DC when they should be NC how do I change them ?

    My Initials for Game Center are displaying as DC when they should be NC how do I change them ? This makes it confusing for people to add me and is an annoyance please help.

    That's because you scanned them as B/W photos and iPhoto 08 doesn't support the grayscale color profile.  You can either rescan them as color photos or export them as originals out of iPhoto to a folder on the desktop and applhy this Automator application, Convert to JPG and Embed sRGB Profile, on them and then remimport into iPhoto. You can download it from  Toad's Cellar .  Be sure to read the warning on the website about not applying it on your only copies.
    OT

  • How to prevent the system to post without Profit Center

    Hi All,
    SAP has posted some transactions without profit center being filled, which is causing issue to our profit center reporting.
    How can we force the system not to post the document without profit center and how to correct the existing one?
    Regards,
    Servesh

    Hi,
    You can pass on the exiting documents to the profit center accounting using transaction code 1KE8
    For forcing the system to check profit center, please apply OSS note 1249888:-
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1249888]
    Alternatively, you can define validations. But best is to use this OSS note.
    Regards,
    Garuav

Maybe you are looking for

  • Sales order creation in project based industry

    Dear Gurus My client is into erection of cement plants and alcohol plants. once client got the order form the customer for the plant setup production will start. delivery and billing will be created when ever one material is ready after the productio

  • Edge Animate 2014.1 not backwards compatible to 2014.0 documents

    This is a request to Adobe: Minor version revisions should not cause project incompatibilities in .an project files! The update to 2014.1 Edge Animate (October 2014) causes trouble in lab settings. My students using 2014.1 on their personal machines

  • I would like to use FireWire to move files between 2 iBook G3's.

    I would like to use FireWire to move files between 2 iBook G3's but the disk icon for the target disk computer does not show on the other. I've tried using 3 different iBooks and 2 different Firewire cables. Are there any other settings I should use?

  • Will moving an Exchange database cause users to have to restart Outlook?

    Hello all, I am running Exchange Server 2007. I will be using the "Move Database Path" command through the Management Console to move the database from one partition to another. The users are mostly running Outlook 2007, but some users are running Ou

  • Deleting Customer Master

    Hi,   I want to delete a customer from SAP. I don't want to use XD06. This would just mark it for deletion. The users in my company created a customer as sold to party and they want to change the account group to ship to. using XD07 - "Change Account