Another bug in Flow layout ?

If a Flow object gets its content during initialization it doesn't take the specified size of the children into account. The sizes are kept if the children are added afterwards. But then they're stacked on top of each other; as described in the other thread.
Example: The buttons sizes are ignored.
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Flow;
import javafx.scene.control.*;
def okButton = Button {
    text: "OK"
    strong: true
    width: 100
    height: 100
def cancelButton = Button {
    text: "Cancel"
    width: 100
    height: 100
def layout = Flow {
    content: [okButton, cancelButton];
Stage {
    title: "Flowlayout Demo"
    scene: Scene {
        width: 400
        height: 400
        content: layout
}Example: The sizes are not ignored, but the positions are.
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Flow;
import javafx.scene.control.*;
def okButton = Button {
    text: "OK"
    strong: true
    width: 100
    height: 100
def cancelButton = Button {
    text: "Cancel"
    width: 100
    height: 100
def layout = Flow {};
layout.content = [okButton, cancelButton];
Stage {
    title: "JavaFX 1.2 Controls Demo"
    scene: Scene {
        width: 400
        height: 400
        content: layout
}

CORRECTION: It works if a child gets a LayoutInfo object. False alarm. MEA CULPA.
def largeButtonDimension = LayoutInfo {
      width: 100
      height: 100
      minWidth: 100
      minHeight: 100
def smallButtonDimension = LayoutInfo {
      width: 50
      height: 50
      minWidth: 50
      minHeight: 50
def okButton = Button {
    text: "OK"
    layoutInfo: largeButtonDimension;
    strong: true
def cancelButton = Button {
    text: "Cancel"
    layoutInfo: smallButtonDimension
def layout = Flow {
    content: [okButton, cancelButton];
}

Similar Messages

  • Bug in Flow layout?

    Before I made a JIRA entry, wanted to see if anyone else thought this was a bug. It drove me crazy for days.
    It appears that if I initialize a Flow content at the time of creation of the Flow object, all is well. However, if I add content in bulk afterwards, all elements are stacked on top of each other. Other layouts (like HBox seem to work just fine). More interestingly, 'later' if I add or remove elements from the flow, it adjusts its size and positions of everything correctly. Weird.
    This works fine:
    function createFlow():Flow{
        var flow:Flow = Flow{
             width: 100 hgap: 5 vgap: 10
             content: for (i in [1..5])
             Rectangle { width: 40 height: 40 }
    Stage {
        scene: Scene {
            content: [
                 createFlow()
    }However, this way stacks the rectangles on top of each other for some reason.
    function createFlow():Flow{
        var flow:Flow = Flow{
             width: 100 hgap: 5 vgap: 10
         for (i in [1..5])
             insert Rectangle { width: 40 height: 40 } into flow.content;
        return flow;
    Stage {
        scene: Scene {
            content: [
                 createFlow()
    }

    Indeed, it sounds as a bug H/VBox had in 1.1.
    I can reproduce your problem with JavaFX 1.2 on Windows XP Pro SP3.
    The following code works fine too:
    Stage {
        scene: Scene {
            content: [
    //~             createFlow()
                   Flow {
                        width: 100 hgap: 5 vgap: 10
                        content: for (i in [1..5])
                             Rectangle { width: 40 height: 40 }
    }but this one fails:
    function createFlow(): Flow {
        var flow: Flow = Flow {
            width: 100 hgap: 5 vgap: 10
        var content = for (i in [1..5])
              Rectangle { width: 40 height: 40 };
        flow.content = content;
        return flow;
    }Looks like Flow prefers to have its sequence provided at creation time...

  • How to ensure Flow Layout wraps contents

    hi,
    having problems with flow layout (in Applet), i can not make it wrap the contents when the window is resized. it just seems to insist that everything be on one line.
    yet i have examples from others that wrap fine. and i believe i am doing everything correct.
    So what's the trick to getting the wrap, and why?

    first thing to say about the flowklayout is that
    1.it respects the componetnt prefered size.
    2.It will arrange the components in one line ( one after another ) respectivily. so the components will appear in the order that you have added them.
    3.it will move the components under each other, each time you try to minimize the Frame or applet, so if the frame or applet is not big enought to be as wide as all the components prefered size it will drop down the least component.
    so it might be better to try another layout, let say BorderLayout. it meight be better.

  • Another bug - field positioning

    Another problem I have noticed is that sometimes the position
    of the field or label on the layout is not what the properties.top
    says. I had a field that was in one place on the layout and in
    another place altogether when it was printed. Once I corrected the
    Top property, it printed in the same place as it was on the layout.
    ie the printing used the Top property, the layout used something
    else to decide where it was located.
    Murray

    No I don't want to use channels. I want to use a 'Solid Fill Colour' layer. If you click on the little icon at the bottom of the layers palette you get a little menu and at the top of that menu you can select 'Solid Colour'. Then you can select the 'Colour Libraries' tab and apply a Pantone Colour as a Solid Fill layer.
    Photoshop definitely DOES support this method because we have been using it here for the last few years, its quite standard practice to work like this before going into channel work or DCS work.
    It means you can double click a layer to reveal its intended Pantone colour rather than cmyk match.
    As I say it works fine in CS2.
    Well it seems its another bug in a very poor update. I just hope CS4 doesn't have the same problems.

  • Another bug? Please tell me that its not true...

    So I updated, everything was working great, album downloading went great, gapless works, etc. I didn't have any issues with sound or anything like that. My problem seems to be a little different than everyone else. And I've noticed 3 things.
    1. My EQ settings for individual tracks only automatically update on the EQ intermittently. There doesn't seem to be any rhyme or reason to it, I've tried with focus on the window, not on the window, changing the EQ setting to something different and then changing it back again. Any ideas?
    2. Downloading from the iTunes Store is butt slow. I'm not entirely sure that this is a problem with the university network I'm on or what but my download speeds are only around 5kb/sec on a fiber backbone but the last episode of Alias currently sits at 133 hours until completion (5.5 days!) and that's completely unacceptable for the network that I'm connected to.
    3. Downloads from the iTunes Store will randomly fail and restart from the beginning. This may be related to whether it's a university problem but I suspect there's a deeper underlying problem with my software. The error codes are different each time and I haven't been keeping track of them but they've appeared in the 9000 range as well as in the 5000 and 500 ranges.
    So what say ye all?
    P.S. Is it true what I'm hearing about downloaded artwork not being transferred to your iPod? I haven't noticed it.
    Powerbook G4 1.5 Ghz   Mac OS X (10.4.7)   1.256 MB RAM, 64 MB GEForceGO, 8x Superdrive

    Ok, this is out of hand. My downloads just failed again. It seems like it gets to a certain point and then just starts over. I actually finished one the other night but then iTunes insisted on 'checking' the file...in actuality, this meant that it would waste processor cycles and supposedly limited bandwidth to mess up whatever was actually downloaded and delete the progress it had made. I can't believe that I'm the only one who has experienced a problem like this. The same applies to my problem with the equalizer. I know that some have bigger problems than this, however it seems like it's just another bug to add to the list of ones that Apple needs to fix rather soon in 7.0.1.
    Also, I've sent a request for support to Apple through the iTunes site about both of these issues and not surprisingly haven't received a reply yet. With all the problems that have been reported thus far, I might not reply either...

  • I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that informat

    I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that information is not sufficiently detailed for me. I have tried several options, but I come now way. Generally it seems that your information is only for the ones who can, not for the people who can´t although it is we who really need to learn. Please give me a step by step (click by click) information on how I can get the ice above the flower and then make the ice partly transparent so the flower is seen underneath. Please send me an e-mail Erik Solbu [email protected]

    Open a new document big enough for your image. Then additional open your ice and flower image as well. Copy each and paste it into your blank document. They will be placed on their own separate layers.
    Make sure in your layers panel. (Bottom right) the ice is above the flower, by dragging it in place. In that same layers panel click the ice layer to select in and find the opacity meter above. Drag to the left until you get the effect you desire.

  • Another bug in sun one studio?

    is this another bug in sun one studio or something else.
    i have set the author to a different name through
    tools -> options -> java sources
    but when i create session beans or cmp beans, it uses the previous name.
    however java main classes display the new name

    This looks like a bug to me. I didn't see anything in the bug database that was similar, so I would suggest that you file a bug at:
    http://java.sun.com/webapps/bugreport/
    using:
    Category: Sun Java Studio, Sun ONE Studio, Forte for Java
    SubCat: EJB Components

  • Flow Layout

    Hey,
    i got a little problem. I need to write a clozeTest in JavaFx and it´s not function like i want.
    The problem that i have, is that the text shouldn´t start on a new line in case he hasn´t enough place.
    * clozeStage.fx
    * Created on 03.06.2010, 13:17:03
    package progressbar;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.ext.swing.SwingTextField;
    import javafx.scene.layout.Flow;
    import javafx.scene.shape.Ellipse;
    import javafx.scene.paint.Color;
    import javafx.geometry.HPos;
    import javafx.scene.layout.Tile;
    import javafx.scene.layout.HBox;
    import javafx.scene.Group;
    import javafx.scene.layout.VBox;
    * @author Dori
    var tf: SwingTextField[];
    var luecken: String [];
    var test:Boolean;
    luecken = ["Ich werde gleich ausflippen. Ich","(lernen) dieses JavaFX. Ich finde das echt toll. Außerdem werde ich jetzt mal ein bisschen extrem langen dummen Text schreiben, damit ich überprüfen kann, ob das gute FlowLayout auch einen Umbruch macht.",
                "Das ist ein Test, ob er auch"," automatisch zwischen Wörtern trennen kann.", " Voila", "Ohyeah"];
    for(i in [0..10]){
         tf=SwingTextField {
         columns: 5
         text: ""
         editable: true
    Stage {
    title: "Application title"
    scene: Scene {
    width: 900
    height: 400
    content: [
    Flow{
    width:700
    hpos: HPos.LEFT
    content:[
    for (m in [0..20]){
    if(test == false){
    test = true;
    Text{
    content: luecken[m/2]
    font: Font{size:15}
    wrappingWidth:700
    else{
    test = false;
    tf[m]
    It would be nice if somebody could help me.
    Edited by: avalonne on Jun 7, 2010 3:51 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Answered (I think) in the second [Flow Layout|http://forums.sun.com/thread.jspa?threadID=5441485] topic.

  • Another bug in processSockets?

    I am running Weblogic Server 7.0 on Red Hat Linux and unfortunately cannot use
    the JCOM feature due to an uncaught exception in processSockets. The client is
    a Windows 2000 machine and when a call is made (from my own example, or the shipped
    zero client or late bound examples) into the Weblogic Server on the Linux machine,
    I get the following :
    <Aug 14, 2002 7:42:18 AM EDT> <Error> <socket> <000405> <Uncaught Throwable in
    processSockets
    java.lang.NullPointerException
    java.lang.NullPointerException
    at weblogic.com.MuxableSocketDCOM.isMessageComplete(MuxableSocketDCOM.java:182)
    at weblogic.com.MuxableSocketDCOM.dispatch(MuxableSocketDCOM.java:203)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:507)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:429)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    Has anyone else run into this problem, or should this be sent to BEA to fix???
    Thanks,
    Frank

    No I don't want to use channels. I want to use a 'Solid Fill Colour' layer. If you click on the little icon at the bottom of the layers palette you get a little menu and at the top of that menu you can select 'Solid Colour'. Then you can select the 'Colour Libraries' tab and apply a Pantone Colour as a Solid Fill layer.
    Photoshop definitely DOES support this method because we have been using it here for the last few years, its quite standard practice to work like this before going into channel work or DCS work.
    It means you can double click a layer to reveal its intended Pantone colour rather than cmyk match.
    As I say it works fine in CS2.
    Well it seems its another bug in a very poor update. I just hope CS4 doesn't have the same problems.

  • White space after flowed layout/expandable fields?

    Hi,
    I have a few pages on a form with a flowed layout where the text fields expand.The problem I am having is when the text field expans and continues on the following page,its leazing an entire white space right after it.Is there a way to do this so eventhough the text field expands onto the next page,the content on the next page continues right after the expanded field without a page of white space?
    Thanks.

    Hi,
    You need to check Allow page breaks within content option for the subform. Object > Subform >  Allow page breaks within content.
    By default even for the field this option would be checked if it is not You need to do samething even for the field.
    This would work.
    -Vjay

  • Call a bounded task flow from within another bounded task flow

    Hello
    I am using Jdev 11g Release 1 and need help with the following issue...
    Here's an outline of my application..:
    1. There is a main .jspx page with icons to choose different paths.
    2. Each icon denotes a bounded task flow with TRAIN.
    3. Upon clicking on any icon, you get into a series of TRAIN STOPS.
    4. On one of the TRAIN STOP there is a button to ADD NEW which shows a popup that is tied to another bounded task flow with TRAIN STOPS.
    5. This taskflow 2 calls a method as its default activity.
    The issue is when I click on ADD NEW, the popup displays empty. I even put break points on the method and it doesn't even go to the method. The input parameters on the method have been checked so I know that is not an issue. Any clues as to why it won't open the popup..?
    Any help will be greatly appreciated.

    vinod_t_krishnan wrote:
    i guess there is something corrupted in the definition file that is created for the method action in your taskflow.. can u cross check that..What do you mean? How do I cross check this...? Please help
    and also check if the DataBindings.cpx has the correct reference of the method definiiton file..Did this..all references point correctly
    or otherwise can u drag and drop the method again on to the taskflow and try.. if this time it had created all entries correctly.?Tried it ...doesn't work =(

  • GridBag or Flow Layout: Help Please!!!

    Requirement: Allow the user to input the amount of a mortgage and then select from a menu of mortgage loans: 7 years at 5.35%, 15 years at 5.5%, and 30 years at 5.75%. Use an array for the different loans. Display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. Allow the user to loopback and enter a new amount and make a new selection or quit.
    I have written the code so far that allows for the creation of the pane, texts, user entry, combobox, and buttons.
    My problem is that I cannot get it sorted out to look like a usable interface. I don't know if I should go with a GridBag Layout or a Flow Layout.
    I am using the GridBag Layout in this example, but obviously I am missing the correct procedure on how to do it.
    Can anyone give me a hand?
    My goal for the interface is to have the following fields set up in the pane to lay out like this:
    Mortgage ------ MortgageTF
    Loan ----- LoanCB
    Payment ----- PaymentTF
    Balance
    Compute----- Reset----- Exit
    Thank you for any assistance.
    Havok
    My written code is below:
    import javax.swing.*;
    import java.awt.*;
    public class MCalc002 extends JFrame
    public MCalc002()
    super("Mortgage Calculator");
    setSize(500, 800);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
    Container pane = getContentPane();
    GridBagLayout gridBag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    pane.setLayout(gridBag);
    JLabel mortgage = new JLabel("Mortgage:");
    c.gridx = 0; c.gridy = 0;
    pane.add(mortgage);
    JLabel loan = new JLabel("Loan Menu:");
    c.gridx = 2; c.gridy = 2;
    pane.add(loan);
    JLabel payment = new JLabel("Monthly Payment:");
    c.gridx = 3; c.gridy = 3;
    pane.add(payment);
    JLabel balance = new JLabel("Loan Balance:");
    c.gridx = 4; c.gridy = 4;
    pane.add(balance);
    JTextField mortgageTF = new JTextField(10);
    c.gridx = 4; c.gridy = 4;
    pane.add(mortgageTF);
    JComboBox loanCB = new JComboBox();
    c.gridx = 5; c.gridy = 5;
    loanCB.addItem("Please Select");
    loanCB.addItem("7yrs @ 5.35%");
    loanCB.addItem("15yrs @ 5.5%");
    loanCB.addItem("30yrs @ 5.75%");
    pane.add(loanCB);
    JTextField paymentTF= new JTextField(10);
    c.gridx = 4; c.gridy = 4;
    pane.add(paymentTF);
    JButton compute = new JButton("Compute");
    c.gridx = 5; c.gridy = 5;
    pane.add(compute, c);
    JButton reset = new JButton("Reset");
    c.gridx = 6; c.gridy = 6;
    pane.add(reset, c);
    JButton exit = new JButton("Exit");
    c.gridx = 7; c.gridy = 7;
    pane.add(exit, c);
    setContentPane(pane);
    public static void main(String[] arguments)
    MCalc002 pb = new MCalc002();
    //EOF

    My problem is that I cannot get it sorted out to look
    like a usable interface. I don't know if I should go
    with a GridBag Layout or a Flow Layout.
    My goal for the interface is to have the following
    fields set up in the pane to lay out like this:
    Mortgage ------ MortgageTF
    Loan ----- LoanCB
    Payment ----- PaymentTF
    Balance
    Compute----- Reset----- Exit
    import javax.swing.*;
    import java.awt.*;
    public class MCalc002 extends JFrame {
        public MCalc002() {
            super("Mortgage Calculator");
            setSize(500, 800);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container pane = getContentPane();
            GridBagLayout gridBag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            pane.setLayout(gridBag);
            JLabel mortgage = new JLabel("Mortgage:");
            c.gridx = 0; c.gridy = 0;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(mortgage, c);
            pane.add(mortgage);
            JLabel loan = new JLabel("Loan Menu:");
            c.gridx = 0; c.gridy = 1;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(loan, c);
            pane.add(loan);
            JLabel payment = new JLabel("Monthly Payment:");
            c.gridx = 0; c.gridy = 2;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(payment, c);
            pane.add(payment);
            JLabel balance = new JLabel("Loan Balance:");
            c.gridx = 0; c.gridy = 3;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(balance, c);
            pane.add(balance);
            JTextField mortgageTF = new JTextField(10);
            c.gridx = 3; c.gridy = 0;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(mortgageTF, c);
            pane.add(mortgageTF);
            JComboBox loanCB = new JComboBox();
            c.gridx = 3; c.gridy = 1;
            c.insets = new Insets(20,10,20,10);
            loanCB.addItem("Please Select");
            loanCB.addItem("7yrs @ 5.35%");
            loanCB.addItem("15yrs @ 5.5%");
            loanCB.addItem("30yrs @ 5.75%");
            gridBag.setConstraints(loanCB, c);
            pane.add(loanCB);
            JTextField paymentTF= new JTextField(10);
            c.gridx = 3; c.gridy = 2;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(paymentTF, c);
            pane.add(paymentTF);
            JButton compute = new JButton("Compute");
            c.gridx = 0; c.gridy = 4;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(compute, c);
            pane.add(compute, c);
            JButton reset = new JButton("Reset");
            c.gridx = 1; c.gridy = 4;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(reset, c);
            pane.add(reset, c);
            JButton exit = new JButton("Exit");
            c.gridx = 3; c.gridy = 4;
            c.insets = new Insets(20,10,20,10);
            gridBag.setConstraints(exit, c);
            pane.add(exit, c);
            setContentPane(pane);
            setVisible(true);  // Generally speaking, this should be the last operation in setting up GUI components.
        public static void main(String[] arguments) {
            MCalc002 pb = new MCalc002();
    }

  • ITextSharp and Flow Layout

    I am filling out a form using iTextSharp . I have a flow layout subform with a multiline textbox on the form, expand to fit set to true. Still, when I insert text into the textbox programmatically, it does not expand. If I fill out the pdf form interactively, it works fine.
    Any help would be appreciated.
    Thanks

    I use the Acrofields.SetField method ,like this:
    AcroFields pdfFormFields = pdfStamper.AcroFields;
    foreach (PrintableFormDataField dataField in _DataFields)
    pdfFormFields.SetField(dataField.DataLabel, dataField.DataValue);

  • Span div problem on flow layout

    i want to use flow layout for my page. if there is any component that includes div tag it causes new line on html page. i use page fragments in my page. if there is any fragment that includes div tag next component appears on new line. i want to place more than one components in the same line. how can i do that?

    Hi!
    You can play with mode of position property. Open 'style' property, select 'Position' part and try to change 'Mode'.
    Thanks,
    Roman.

  • Spacing JButtons on Flow Layout....

    Hello,
    I am a Java student. The assignment was to create a calculator. I have just begun the layout portion (to me the hardest part).... I decided to go with Flow Layout due to its easiest nature to a beginner.
    Here is the code i have so far:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Calculator extends JFrame
         public static final int width = 300;
         public static final int height = 260;
         public static void main(String[] args)
              Calculator gui = new Calculator();
              gui.setVisible(true);
         public Calculator()
              setSize(width, height);
              addWindowListener(new WindowDestroyer());
              setTitle("Calculator");
              Container contentPane = getContentPane();
              contentPane.setLayout(new FlowLayout());
              contentPane.setBackground(Color.LIGHT_GRAY);
              JPanel aPanel = new JPanel();
              JTextField display = new JTextField(25);
              contentPane.add(aPanel);
              aPanel.add(display);
              JPanel anotherPanel = new JPanel();
              contentPane.add(anotherPanel);
              JButton backspace = new JButton("Backspace");
              contentPane.add(backspace);
              JButton clearEntry = new JButton("CE");
              contentPane.add(clearEntry);
              JButton clear = new JButton("C");
              contentPane.add(clear);
              JButton mc = new JButton("MC");
              contentPane.add(mc);
              JButton sevenButton = new JButton("7");
              contentPane.add(sevenButton);
              JButton eightButton = new JButton("8");
              contentPane.add(eightButton);
              JButton nineButton = new JButton("9");
              contentPane.add(nineButton);
              JButton divide = new JButton("/");
              contentPane.add(divide);
              JButton sqrt = new JButton("sqrt");
              contentPane.add(sqrt);
              JButton mr = new JButton("MR");
              contentPane.add(mr);
              JButton fourButton = new JButton("4");
              contentPane.add(fourButton);
              JButton fiveButton = new JButton("5");
              contentPane.add(fiveButton);
              JButton sixButton = new JButton("6");
              contentPane.add(sixButton);
              JButton multiply = new JButton("*");
              contentPane.add(multiply);
              JButton percent = new JButton("%");
              contentPane.add(percent);
              JButton ms = new JButton("MS");
              contentPane.add(ms);
              JButton oneButton = new JButton("1");
              contentPane.add(oneButton);
              JButton twoButton = new JButton("2");
              contentPane.add(twoButton);
              JButton threeButton = new JButton("3");
              contentPane.add(threeButton);
              JButton minusButton = new JButton("-");
              contentPane.add(minusButton);
              JButton reciprocal = new JButton("1/x");
              contentPane.add(reciprocal);
              JButton mplus = new JButton("M+");
              contentPane.add(mplus);
              JButton zeroButton = new JButton("0");
              contentPane.add(zeroButton);
              JButton plusMinus = new JButton("+/-");
              contentPane.add(plusMinus);
              JButton dotButton = new JButton(".");
              contentPane.add(dotButton);
              JButton additionButton = new JButton("+");
              contentPane.add(additionButton);
              JButton equalsButton = new JButton("=");
              contentPane.add(equalsButton);
    Keep in mind i will do the action listeners and everything later..... i am NOT looking for anyone to do coding for me, but here's what i would like if at all possible:
    the assignment calls for the calculator to visually appear similar/just like the windows calculator..... so in other words i need the "MC" button to start the second line, MR button to start the third, etc....
    My text book, Introduction to Java by Walter Savitch, explains Swing and JButtons, but at no time provides an example with buttons on more than one line, or how to create a new line.
    **Keep in mind this is not for an applet!!!**
    I appreciate all your help!
    -ABT-

    i almost forgot to mention what the problem was...
    with Flowlayout, it prints the buttons in order, but just as many can fit on one line.... so when you compile and run the code, the MC button appears on the first line with the 7 button starting the second line....
    I need to figure out how to insert a (web-equivalent) <br> in the code, to tell the swing module to start a new line for the next set of JButtons.
    thanks
    -ABT-

Maybe you are looking for