Flow layout help please

I am trying to position 3 buttons with 3 text fields underneath. I am using flowlayout but it puts it all on one line. I have tried grid layout too but this doesn't help.
Is there anything I can do to split the buttons and text fields onto 2 separate lines?
thanks

I have tried grid layout too but this
doesn't help.Yeah? hmm... it should work:
setLayout(new GridLayout(2,3));
getContentPane.add(button1);
getContentPane.add(button2);
getContentPane.add(button3);
getContentPane.add(text1);
getContentPane.add(text2);
getContentPane.add(text3);

Similar Messages

  • 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();
    }

  • Dreamweaver CC layout help please (using floats)

    Hi All,
    I'd appreciate any help with this problem creating my ideal Dreamweaver CC layout!
    Please see the screen shot below. Everything is perfect except I can't get the div labeled "div-right" at the bottom to sit on the right just like the one that sits on the left of middle divs that I have already aligned nicely.
    I have my coding the way I understand most, so I can attach that in another post if needed.
    Thanks!!!!

    sorry Nancy, work is very busy!
    For now, here is my code
    I hope its of some use at least for now..
    Thanks!
    <!doctype html> 
    <html> 
    <head> 
    <meta charset="utf-8"> 
    <title>HTML5 2-Col Layout</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <!--[if IE]> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <![endif]--> 
    <!--[if lt IE 9]> 
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
    <![endif]--> 
    <style> 
    /**CSS Reset**/ 
        padding: 0; 
    /**fixes the CSS box model in responsive layouts**/ 
        -webkit-box-sizing: border-box; 
        -moz-box-sizing: border-box; 
        box-sizing: border-box; 
    img { 
        max-width: 100%; 
        vertical-align: baseline; 
    body { 
        padding: 0; 
        width: 90%; /**adjust width in px or % as required**/ 
        margin: 0 auto; /**this is centered**/ 
        background: #F5DD83; 
        color: #505050; 
        font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif; 
        font-size: 100%; 
        box-shadow: 2px 2px 4px #333; 
    header { 
        margin: 0; 
        padding: 0 1%; 
        width: 100%; 
        background: #B00202; 
        color: #FFF; 
    header h1, header h2 { 
        display: inline; 
        color: #F5DD83; 
        padding: 0 1%; 
    /**top menu**/ 
    nav { 
        background: #69C; 
        font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif; 
        font-size: 14px; 
        font-weight: bold 
    nav ul { 
        margin: 0; 
        padding: 0; 
    nav li { 
        list-style: none; 
        display: inline-block; 
        margin: 0 3% 0 5%; 
    /**menu link styles**/ 
    nav li a { 
        color: #FFF; 
        text-decoration: none; 
        line-height: 2.5em; 
        padding: 6px; 
        border: 1px solid #CCC; 
    /**on select or mouseover**/ 
    nav li a:hover, nav li a:active, nav li a:focus { 
        background: #CCC; 
        color: #505050; 
    #wrapper { 
        background: #DDD; 
        overflow: hidden; /**float contaiment**/ 
    /**left sidebar**/ 
    aside { 
        padding: 0 2%; 
        float: left; 
        width: 30%; 
    /**main content**/ 
    article { 
        padding: 0 2%; 
        background: #FFF; 
        float: left; 
        width: 70%; 
    figure {  
    width: 80%;  
    margin: 4% auto 4% auto;  
    text-align:center; 
    figcaption { 
        text-align: center; 
        font-style: oblique; 
        font-size: small; 
        color: #2294AE; 
    footer { 
        clear: both; 
        background: #B00202; 
        color: #FFF; 
        text-align: center; 
        margin: 0; 
    /**text styles**/ 
    h3 { 
        color: #2294AE; 
        margin-bottom: 0 
    p { margin: 0 0 1em 0 } 
    #left-div {
      background-color: #D3D3D3;
      height: 100px;
      width: 650px;
    </style> 
    <link rel="stylesheet" href="ajxmenu3.css" type="text/css">
    <link rel="stylesheet" href="ajxmenu4.css" type="text/css">
    <link rel="stylesheet" href="ajxmenu6.css" type="text/css">
    </head> 
    <body> 
    <!--begin header--> 
    <header> <h1>Hassengate Pharmacy</h1> 
    </header> 
    <!--begin navigation--> 
    <nav> 
    <ul> 
    <div class="AJXCSSMenuUGYETAC"><!-- AJXFILE:ajxmenu4.css -->
    <div class="ajxmw">
      <div class="ajxmw2">
    <div class="ajxtbg">
    <ul>
    <li class="tfirst"><a href="#">Home</a></li>
    <li class="tsub"><a class="ajxsub" href="www.google.com">Pharmacy</a>
      <ul>
       <li class="sfirst slast"><a href="#">News</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Shop</a>
      <ul>
       <li class="sfirst slast"><a href="#">Offers</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">NHS Services</a>
      <ul>
       <li class="sfirst"><a href="#">MUR</a></li>
       <li class="slast"><a href="#">NMS</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">1</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">2</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">3</a></li>
      </ul>
    </li>
    <li class="tlast tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">4</a></li>
      </ul>
    </li>
    <li class="tlast tsub"></li>
    </ul>
    </div>
      </div>
    </div>
    <br >
    </div>
    </ul> 
    </nav> 
    <div id="wrapper">  
    <!--begin left sidebar--> 
    <aside>
      <p align="center"> 
      <p align="center">Conditions
      <div class="AJXCSSMenuWOENVAC">
        <div align="left">
          <!-- AJXFILE:ajxmenu6.css -->
        </div>
        <div class="ajxmw">
          <div class="ajxmw2">
            <div class="ajxtbg">
              <div align="left">
                <ul>
                  <li class="tfirst tsub"><a class="ajxsub" href="#">Condition 1</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">1-1</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">1-1-1</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                  <li class="tsub"><a class="ajxsub" href="#">Condition 2</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">2-2</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">2-2-2</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                  <li class="tlast tsub"><a class="ajxsub" href="#">Condition 3</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">3-3</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">3-3-3</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                </ul>
              </div>
              </div>
            </div>
        </div>
        <div align="left"><br >
        </div>
      </div> </p>
      <p> </p>
      </p> 
    </aside> 
    <!--begin main content--> 
    <article> <h3>Article</h3> 
    <p> </p> 
    <figure></figure>
    <figure>
      <figcaption></figcaption> 
    </figure> 
    </article> 
    <!--end wrapper--></div> 
    <!--begin footer--> 
    <footer>  
    <small>© Hassengate Pharmacy 2014 All rights reserved</small>  
    </footer> 
    </body> 
    </html> 

  • Layout help please

    I am very new to dreamweaver and would like to make a website with layout featuring a drop down bar (similar to the bar on http://www.layersmagazine.com) but I am pretty confused about what I should do. I have some code set up already but I would quite like the dropdown bar
    <div id="navigation">
    <div class="container clearfix">
    <ul class="pages">
    <!--<li><a href="http://website.co.uk" title="Website Home">Home</a></li>-->
    <li class="current_page_item"><a href="http://website.co.uk/products" title="Products">Products</a>
    <ul style="display:none;" class="drops"> 
    <li><a href="http://website.co.uk/category/costs">Costs</a></li>
    <li><a href="http://website.co.uk/category/deals">Deals</a></li>
    </ul>
    </li>
    <li><a href="http://website.co.uk/contact" title="Contact Us">Contact Us</a>
    <ul style="display: none;" class="drops">      
    <li><a href="http://website.co.uk/contact/email">Email</a></li>
    </ul>
    </li>
    </ul>
    (don't worry there is already a <body> and <html>)
    Thanks in advance

    fccollins wrote:
    It says:
    "This document contains JavaScript code for a widget that no longer exists. If you don't remove the code, the browser might display JavaScript errors when loading the page. WOuld you like Dreamweaver to find all instances of this code for you?
    Widget: var MenuBar1 = new Spry.Widget.MenuBarDownHover.gif",
    {imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
    imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    That most likely means you have not saved the file correctly or defined the site folder.
    Have you completed the steps outlined above...defined a site folder so Dreamweaver knows where to store all the associated files your site might need?

  • Flow Layout....please help!

    Hi all,
    I am having trouble with my flow Layout manager. As i add more and more components to the panel, I am not able to see the components unless the resize the frame, I am wondering is there a way that I can make flow Layout manager to creat a new line rather than continuing adding to one horizontal line!!!!!??????
    Thank you for your attention,
    Dan

    thank you all for all the help, however, i am still having trouble setting the layout of my control panel......
    so here is my sample code!!!
    and please correct me!!!!
    public DrawControls(DrawPanel target) {
         this.target = target;
         //setLayout( new GridBagLayout());
         //setLayout(new FlowLayout());
         setBackground(Color.white);
         target.setForeground(Color.red);
         CheckboxGroup group = new CheckboxGroup();
         Checkbox b;
         add(b = new Checkbox(null, group, false));
         b.addItemListener(this);
         b.setForeground(Color.red);
         add(b = new Checkbox(null, group, false));
         b.addItemListener(this);
         b.setForeground(Color.green);
         add(b = new Checkbox(null, group, false));
         b.addItemListener(this);
         b.setForeground(Color.blue);
         add(b = new Checkbox(null, group, false));
         b.addItemListener(this);
         b.setForeground(Color.pink);
         add(b = new Checkbox(null, group, false));
         b.addItemListener(this);
         b.setForeground(Color.orange);
         add(b = new Checkbox(null, group, true));
         b.addItemListener(this);
         b.setForeground(Color.black);
         target.setForeground(b.getForeground());
         //setLayout(new FlowLayout());
         //Line buttons
         //setLayout(new BorderLayout());
         insertLine = new Button("H.Lines");
              insertLine.addActionListener(this);
              insertLine.setBackground(Color.lightGray);
         add(insertLine);
         // String buttons
         insertVerLine = new Button("V.Lines");
         insertVerLine.addActionListener(this);
         insertVerLine.setBackground(Color.lightGray);
         add(insertVerLine);
         insertString = new Button("Descripion");
                   insertString.addActionListener(this);
                   insertString.setBackground(Color.lightGray);
         add(insertString);
         // logo button
         insertLogo = new Button("Graphics");
                   insertLogo.addActionListener(this);
                   insertLogo.setBackground(Color.lightGray);
         add(insertLogo);
         //delete button
         delete = new Button("Delete");
                   delete.addActionListener(this);
                   delete.setBackground(Color.lightGray);
         add(delete);
         //reset button
         reset = new Button("Reset");
                   reset.addActionListener(this);
                   reset.setBackground(Color.lightGray);
                   reset.setForeground(Color.red);
         add(reset);
         //label
         Label label1 = new Label("Text");
         add(label1);
         //textbox
         yourText = new TextField(10);
         //yourText.setMaximumSize(yourText.getPreferredSize());
         add(yourText);
    TextField yourText;
    Button insertLine;
    Button insertVerLine;
    Button insertString;
    Button insertLogo;
    Button delete;
    Button reset;

  • HT201412 Help please "Flow" crashing !! .

    I had downloaded the app "Flow" earlier today. It was working perfectly fine. Then after my ipod died I put it on the chrager and i turned it back on, I click on the app. It starts up, then goes back to the home screen. I have an Ipod 4g and my software is up to date. All of the other apps work perfectly fine. Quite frustrating since this has never happend before. Also i have tries restarting it 3 times. So, help please thanks.

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • HI. When I plug in my charger and use my macbook, I feel some kind of roughness on the body. It feels like some current flowing around it. Need help please.

    HI. When I plug in my charger and use my macbook, I feel some kind of roughness on the body. It feels like some current flowing around it. Need help please.

    My 2006 MacBook Pro and my 2011 MacBook Air both do it.  It happens because the earth ground stops at the power brick and is not carried through to the case of the machine.  It is not dangerous or the machine would not have been UL approved.
    Since I operate on battery 99.9999% of the time it doesn't bother me at all.

  • Some Kind of "Flow" Layout

    Is there any way to make panel groups do some kind of "flow" layout instead of based on the grid?
    An example is a panel group what has 6-8 other gridpanels and panel groups in it. the problem is when you programmatically turn on/off various gridpanels or panel groups, instead of the ones that are turned on "flowing" to the top of the enclosing panel group, they are evenly spaced vertically within the enclosing structure.
    This makes for ugly pages, and goofy layout. Is there anyway to change the layout algorithm so that it will layout left-ish and up-ish rather than this scattered vertically???
    thx,
    Kristofer

    Hi Kristofer,
    The following info might be of help to you:
    The Grid panel displays components in rows and columns. The number of columns can be specified by going to the Properties sheet and entering a value for the Columns property. For example if you mention 5 columns and you drop 12 components into the grid panel, the components will be arranged in 3 rows with the frist two rows having 5 components each and the last row having 2 components. If one of the components' rendered property is set to false then these components after that empty cell move back one cell.
    The group panel infact uses flow layout. The order in which the components appear is the order in which they were dropped onto the page. This applies for the grid panel too.
    I hope this info will be of use to you. Please do revert back in case you have any more queries.
    Cheers
    Giri :-)
    Creator Team

  • Troubleshooting: Help please. Creating a PDF file from a Photoshop-designed project

    I wanted to add personal design elements to my resume so I decided to use Photoshop to add in a logo and a footer. The problem is, when I converted the 3 Photoshop .psd files (3 pages) to .pdf files, the combined file came out to be very big in size. The biggest was 2.88 MB and the smallest that I got it to be without compromising the quality of the text and images was 1.48 MB.
    What did I do wrong?
    I've seen other .pdf files with more images and more color and definitely more pages and text which were only 300KB in size. How can I make my final .pdf file size small but still retain the quality of the original design from Photoshop?
    I've tried merging the layers before saving. I've tried turning the files into .gif files before making the pdf. Into jpegs before making the pdf. Changing the canvas and image sizes in Photoshop into super small which made the final pdf file unreadable and super blurry. I'm at my wit's end.
    Details:
    .psd image size 8.5 by 11 inches (normal resume size)
    colors - black, gray, light blue and light yellow
    Images are very minimal, 4 lines total and around 5 circles at the header of the first page and footer of the 3rd page.
    Help please!
    X-cross-post: Acrobat Forum-X

    This is so sad. I read your comments and I said, "Huh?" Haha!
    I tried the indexed color option and it did make the final file smaller. Around 600KB. But there's probably another way to make it even smaller like the gazillion-paged pdf file that I mentioned that was only about 300KB.
    And by saying a layout program, does that mean like Adobe InDesign? Does that mean that I should just make my graphics in Photoshop and then import using another program and finish the file there?
    What other layout programs can I use?
    Thank you so much!

  • 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.

  • 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);

  • 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-

  • ScrollPane Flow Layout

    Hi Guys,
    I am at my wits end as to how I can solve this. I really can't find a solution, I hope you can help.
    I have a gui layout thus:
    JTabbedPane -> JScrollPane -> JPanel -> JPanel (instead of awt.canvas)
    I have multiple java2d 'graphs' that I wish to layout on this scrollpane left to right which then wrap. If the screen is full, vertical scrollbars are triggered. So I think flow layout is the closest to this as I really must maintain the original component size. Grid layout etc resize the graphs making it look wrong.
    The problem is that with flow layout, it scrolls infinitely horizontally. The only way I can get to to stop scrolling harizontally is by calling setPreferedSize(). When I do this however it seems to disable the scroll bars.
    I have tried all combinations of layout managers to try and give me the same effect - to no avail. I have tried setting the scrollpane display policies and again this has no effect.
    So I suppose I can see two possibilites:
    1- find some way of getting the scrollpane to wrap without setPreferredSize()
    2- find a way of getting the scroll bars working, with setPreferredSize()
    My code, looks like this:
    scrollPaneContents_ = new JPanel();
    scrollPaneContents_.setPreferredSize(new Dimension(scrollPane_.getWidth(),scrollPane_.getHeight()));
    scrollPaneContents_.setLayout(new FlowLayout(FlowLayout.CENTER));
    scrollPane_ = new JScrollPane(scrollPaneContents_);
    //scrollPane_ = new JScrollPane(scrollPaneContents_/*,
    //scrollPane_.VERTICAL_SCROLLBAR_AS_NEEDED,scrollPane_.HORIZONTAL_SCROLLBAR_NEVER*/);
    //layout.setConstraints(scrollPane_, layoutConstraints);
    // I want it to scroll to the width less and continue downwards forever
    scrollPaneContents_.setVisible(true);
    tabView_.add("Tab Name",scrollPane_);
    tabView_.refresh();
    view_.refresh();
    scrollPaneContents_.add(graphView_);
    As you can see I have commented some out to try every combination :)
    Any suggestions?
    TIA

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class GridBagAddition
        public static void main(String[] args)
            DisplayPanel displayPanel = new DisplayPanel();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new JScrollPane(displayPanel));
            f.getContentPane().add(displayPanel.getButtonPanel(), "South");
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class DisplayPanel extends JPanel
        JButton addButton;
        GridBagConstraints gbc;
        int[] gridwidths = {
            GridBagConstraints.RELATIVE, GridBagConstraints.REMAINDER
        int graphCount = 0;
        public DisplayPanel()
            addButton = new JButton("add graph");
            setLayout(new GridBagLayout());
            gbc = new GridBagConstraints();
            gbc.weightx = 1.0;
            gbc.weighty = 1.0;
            gbc.insets = new Insets(10,5,10,5);
        public JPanel getButtonPanel()
            addButton.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    gbc.gridwidth = gridwidths[graphCount++ % gridwidths.length];
                    add(new GraphPanel(), gbc);
                    revalidate();
            JPanel panel = new JPanel();
            panel.add(addButton);
            return panel;
    class GraphPanel extends JPanel
        final int PAD = 20;
        public GraphPanel()
            setPreferredSize(new Dimension(200,175));
        public void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            int width = getWidth();
            int height = getHeight();
            int x0 = PAD;
            int x1 = width - PAD;
            int y0 = height - PAD;
            int y1 = PAD;
            g2.draw(new Line2D.Double(x0, y0, x0, y1));
            g2.draw(new Line2D.Double(x0, y0, x1, y0));
           

  • Soundtrack problems - help please

    Help please. I tried doing a send to multi-track project from FCP with the base layer video option and kept getting the 'error sending selection to Soundtrack Pro' message. I did a search and the suggestion is that I have no disk space but I have over 600GB!
    Then I tried a send with the full video and the file saved okay. However when I try to open the .stmp file, Soundtrack Pro starts and then freezes. I've tried opening in various ways.
    Help please, I just cannot figure this out! What am I doing wrong?

    Not sure how much help this is, but since you're having problems with the layout, did you try deleting the layout file? MacintoshHD/users/username/Library/Application Support/Soundtrack Pro/Layouts
    BTW, I found a BKiLifeConfiguration.plist in the following path:
    MacintoshHD > Library > Application Support > ProApps > Internal Plug-ins > BrowserKit > iLife.bkplugin > Contents > Resources
    Do you find it there?

  • PCG 7: Flow Rules help

    E-Bus 11i Flow Rules Help
    Hi I need to create a flow rule that will notify an employee's supervisor when a user updates their own employee record.
    So I need to link the LAST_UPDATED_BY of the currently updated record to employee_id from FND_USER
    where the FND_USER.USER_ID = <current>.LAST_UPDATED_BY
    I'm looking at my Flow Rule Launch Criteria, but I cannot see how I can say....
    COLUMN=LAST_UPDATED_BY
    CONDITION=Equals
    VALUE= <result of my SQL> <==========
    It looks like I can only put specific hardcoded values in here ??
    Any ideas, or examples for this type of thing?
    Is my requirement clear?
    Thanx
    Russell Foster

    Hi Foster
    In the launch criteria you can specify under the table name FND_USER, Relationship keys would be (USER_NAME, USER_ID)
    please check the check box "UPdate" uncheck "Insert"
    coming to the columns enter value "LAST_UPDATE_BY" and condition "IS Update"
    the value part cannot be updated.
    The launch criteria created specifies that when ever the colum Last_update_by of FND_USER is updated the flow rule will get fired.
    Please try and let me know if u face any issues
    thanks

Maybe you are looking for

  • How Can I Improve Mavericks Performance (much slower than 10.8)?

    When I upgraded to OS 10.9, I immediately saw a significant slower performance than with 10.8 or 10.7 (which I had been using for about two years). One big difference was a delay with the boot disc thrashing a lot when I started the computer and when

  • Shell Script not getting invoked in File adapter

    Hi all, Requirement: PI need to pick the file from source directory and send it to target directory using SFTP. I'm using SCP command for this purpose. When I run the shell script (with simple SCP command) from command prompt, script is working fine.

  • Improving Ibook to TV picture quality?

    Hi. I have tried hooking my ibook G4 with my TV (32" CRT) as an external display using the video adapter and a composite video cable. Its really only good for viewing pics and video. Web pages and print are unreadable. Is there any way of improving t

  • How do I create a keyboard in my app?

    I'm planning to make a app that contains my custom keyboard that I also want to intergrate into one of the users main keyboards. How do I make a keyboard, because I'm not sure what to use? Any suggestion would be helpful.

  • Embedding Flash video question

    I'd like to build a page with 3 Flash videos and make the user click "Play" when they want one to start. How do I program that? Previously I've limited each page to one video and it starts automatically.