BoxLayout allignment

I would like the JLabel "addedSectionLabel" to be left aligned however it is always center alligned, any ideas on how to achive this?
JPanel topLeftPanel = new JPanel();
topLeftPanel.setLayout(new BoxLayout(topLeftPanel, BoxLayout.PAGE_AXIS));
JLabel addedSectionLabel = new JLabel("Added Sections:");
addedSectionLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
topLeftPanel.add(addedSectionLabel);Thanks in advance
Calyspo

camikr I really wish you would stop flaming me, you seem to be suggesting that I never post an SSCCE, which I do. I didnt post one this time as it is a very simple question and I thought someone would be able to answer it without
anyway here is a SSCCE:
import java.awt.Dimension;
import javax.swing.*;
public class Alignment {
    private JFrame frame;
    private JList list;
    public void createGui() {
        list = new JList();
        list.setLayoutOrientation(JList.VERTICAL);
        JScrollPane listScroller = new JScrollPane(list);
        listScroller.setPreferredSize(new Dimension(120, 130));
        JPanel topLeftPanel = new JPanel();
        topLeftPanel.setLayout(new BoxLayout(topLeftPanel, BoxLayout.PAGE_AXIS));
        JLabel addedSectionLabel = new JLabel("Added Sections:");
        addedSectionLabel.setAlignmentX(JComponent.LEFT_ALIGNMENT);
        topLeftPanel.add(addedSectionLabel);
        topLeftPanel.add(Box.createGlue());
        topLeftPanel.add(listScroller);
        String[] sectionTypes = {"CHS", "RHS", "SHS"};
        JComboBox sectionTypesComboBox = new JComboBox(sectionTypes);
        topLeftPanel.add(sectionTypesComboBox);
        frame = new JFrame("Section Properties");
        frame.add(topLeftPanel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    public static void main(String[] args) {
        new Alignment().createGui();
}

Similar Messages

  • Is there any way i can change allignment of all my labels in my application

    Basically all my labels have been built so that they are right alligned and i have now run my application passed a user and he fees that it would look more professional to have them left alligned which i agree with.
    Is then anyway to right allign all my labels in my application rather than going through each indiviual label and setting them to right alligned as i have lots of lables in my application?

    Not sure about a similar hack for this but you could try and export as it is, then change one label from with help to no help and then export that and compare to see what has changed between the 2. It might be the p_field_template parameter which may be a little dodgy to change (or it may be fine?). Change at your own risk!!
    If it is nothing obvious like the alignment example then you may have to do it from each page... at least if you have to do this change in the app then you can use the Edit All screen for the items on the page which will be alot quicker than going into each item.

  • Allignment problem between Report Builder And Apps

    Hi All :
    If i am running a report in report builder i am getting 20 records in each page of the reports.but when i am running this same report in apps i am getting 24 records in each page of the apps more than this the records allignment everything has been changed in apps even i am setting equal page setup to both apps and report builder and style and rows and columns also having commen setup. so any one can help how to get same output in both apps and report builder for each and every page(20 records and 20 records)...

    Hi ,
    I have check the /etc/hosts & /etc/services file.
    Both are ok.
    can ping hostname & ip. Can resolve hostname and ip at DNS.
    port 3217 & 3317 is open.
    What else that I should check?
    Thanks.
    ck chai

  • Text in Fla, created with Mac is not alligned in Windows

    Since I work on two machines with different OS, one with Mac 10.8.2 (Flash CS5.5) and one with Windows8 (Flash CS6) I found out that Text inside boxes (shapes) are not alligned when you open it in the other OS.
    This is a screenshot from the SWF exported with a Mac.
    This is the exact same output, only exported in Windows.
    If I save the Fla in Windows, then export it on a Mac, the file looks fine again but still, I would have to export every file on a Mac + this might cause problems when I edit these text boxes.
    I noticed that in CS5 (also on Windows7) already and had hoped it will be fixed in CS6 but apparantly it is not.
    Am I missing something here? I am using the same Publish settings in both OS (latest Flash Player + ActionScript 2.0).

    if you want to give jsfl a shot (works in As2, too)
    This little script parses your whole fla file puts all your TextFields in an Array and let you  adjust the lineSpacing in a loop
    var doc = fl.getDocumentDOM();
    var textFieldArray = fl.findObjectInDocByType("text", doc);
    for (i=0; i<textFieldArray.length; i++) {
        fl.selectElement(textFieldArray[i]);
        fl.getDocumentDOM().setElementTextAttr('lineSpacing', -4);
    You would basically end up with two different swf versions that would show acocordingly to the users OS.

  • Can't use BoxLayout more than once in a class?

    I have a JPanel inside of a JPanel. I am using a BoxLayout
    manager on the main JPanel, and I used to use a GridLayout on the
    sub JPanel. Yesterday I changed the Layout Manager of the subPanel
    to BoxLayout, and now I get this strange error at runtime. Why can't I use
    2 Box Layouts? Why is Java trying to share them?
    Exception in thread "main" java.awt.AWTError: BoxLayout can't be shared
            at javax.swing.BoxLayout.checkContainer(BoxLayout.java:408)
            at javax.swing.BoxLayout.invalidateLayout(BoxLayout.java:195)
            at java.awt.Container.invalidate(Container.java:851)
            at java.awt.Component.addNotify(Component.java:5398)
            at java.awt.Container.addNotify(Container.java:1852)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at java.awt.Container.addNotify(Container.java:1859)
            at javax.swing.JComponent.addNotify(JComponent.java:4270)
            at javax.swing.JRootPane.addNotify(JRootPane.java:658)
            at java.awt.Container.addNotify(Container.java:1859)
            at java.awt.Window.addNotify(Window.java:395)
            at java.awt.Frame.addNotify(Frame.java:479)
            at java.awt.Window.pack(Window.java:413)
            at CDBTest.main(CDBTest.java:246)I need help.
    Thanks
    Josh

    hmm, the following's my code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class PreferencesPane extends JPanel {
    //Main pane to be added to the class
    private JTabbedPane mainPane;
    //the options pane
    private JPanel optionsPane;
    //the accounts list
    private JPanel accountsPane;
    //the personal information display
    private JPanel perInfoPane1;
    private JPanel perInfoPane2;
    //labels
    private JLabel usernameLabel;
    private JLabel newPassLabel;
    private JLabel confPassLabel;
    private JPanel separatorLabel;
    private JLabel nameLabel;
    private JLabel emailLabel;
    private JLabel titleLabel;
    private JLabel companyLabel;
    private JLabel homePhoneLabel;
    private JLabel workPhoneLabel;
    private JLabel cellPhoneLabel;
    private JLabel faxLabel;
    private JLabel homeAddLabel;
    private JLabel workAddLabel;
    private JLabel notesLabel;
    //Textfields
    private JTextField usernameField;
    private JPasswordField newPassField;
    private JPasswordField confPassField;
    private JPanel separatorField;
    private JTextField nameField;
    private JTextField emailField;
    private JTextField titleField;
    private JTextField companyField;
    private JTextField homePhoneField;
    private JTextField workPhoneField;
    private JTextField cellPhoneField;
    private JTextField faxField;
    private JTextArea homeAddField;
    private JTextArea workAddField;
    private JTextArea notesField;
    //Save information button
    private JButton saveInfoButton;
    private JPanel perInfoPane;
    public PreferencesPane() {
    optionsPane = new JPanel();
    accountsPane = new JPanel();
    //labels
    usernameLabel = new JLabel("Username:");
    newPassLabel = new JLabel("New Password:");
    confPassLabel = new JLabel("Confirm New Password:");
    separatorLabel = new JPanel();
    nameLabel = new JLabel("Name:");
    emailLabel = new JLabel("Email:");
    titleLabel = new JLabel("Title:");
    companyLabel = new JLabel("Company:");
    homePhoneLabel = new JLabel("Home Phone:");
    workPhoneLabel = new JLabel("Work Phone:");
    cellPhoneLabel = new JLabel("Cell Phone:");
    faxLabel = new JLabel("Fax:");
    homeAddLabel = new JLabel("Home Address:");
    workAddLabel = new JLabel("Work Address:");
    notesLabel = new JLabel("Notes:");
    //Textfields
    usernameField = new JTextField(20);
    newPassField = new JPasswordField(20);
    confPassField = new JPasswordField(20);
    separatorField = new JPanel();
    nameField = new JTextField(20);
    emailField = new JTextField(20);
    titleField = new JTextField(20);
    companyField = new JTextField(20);
    homePhoneField = new JTextField(20);
    workPhoneField = new JTextField(20);
    cellPhoneField = new JTextField(20);
    faxField = new JTextField(20);
    homeAddField = new JTextArea(10,20);
    workAddField = new JTextArea(10,20);
    notesField = new JTextArea(10,20);
    //Panel to contain the textfield and labels
    perInfoPane1 = new JPanel(new GridLayout(12,2));
    perInfoPane1.add(usernameLabel);
    perInfoPane1.add(usernameField);
    perInfoPane1.add(newPassLabel);
    perInfoPane1.add(newPassField);
    perInfoPane1.add(confPassLabel);
    perInfoPane1.add(confPassField);
    perInfoPane1.add(separatorLabel);
    perInfoPane1.add(separatorField);
    perInfoPane1.add(nameLabel);
    perInfoPane1.add(nameField);
    perInfoPane1.add(emailLabel);
    perInfoPane1.add(emailField);
    perInfoPane1.add(titleLabel);
    perInfoPane1.add(titleField);
    perInfoPane1.add(companyLabel);
    perInfoPane1.add(companyField);
    perInfoPane1.add(homePhoneLabel);
    perInfoPane1.add(homePhoneField);
    perInfoPane1.add(workPhoneLabel);
    perInfoPane1.add(workPhoneField);
    perInfoPane1.add(cellPhoneLabel);
    perInfoPane1.add(cellPhoneField);
    perInfoPane1.add(faxLabel);
    perInfoPane1.add(faxField);
    perInfoPane2 = new JPanel(new GridLayout(3,2));
    perInfoPane2.add(homeAddLabel);
    perInfoPane2.add(homeAddField);
    perInfoPane2.add(workAddLabel);
    perInfoPane2.add(workAddField);
    perInfoPane2.add(notesLabel);
    perInfoPane2.add(notesField);
    //save button
    saveInfoButton = new JButton("Save information");
    perInfoPane = new JPanel(new BoxLayout(perInfoPane,BoxLayout.Y_AXIS));
    perInfoPane1.setAlignmentX(Component.LEFT_ALIGNMENT);
    perInfoPane2.setAlignmentX(Component.LEFT_ALIGNMENT);
    saveInfoButton.setAlignmentX(Component.LEFT_ALIGNMENT);
    perInfoPane.add(perInfoPane1);
    perInfoPane.add(perInfoPane2);
    perInfoPane.add(saveInfoButton);
    //adds components to the TabbedPane
    mainPane = new JTabbedPane(JTabbedPane.LEFT);
    mainPane.add("Options",optionsPane);
    mainPane.add("Accounts",accountsPane);
    mainPane.add("Personal Information",perInfoPane);
    setLayout(new BorderLayout());
    add(mainPane,BorderLayout.CENTER);
    As you can see, the only time I use BoxLayout is the following line:
    perInfoPane = new JPanel(new BoxLayout(perInfoPane,BoxLayout.Y_AXIS));
    As far as I can tell, that's correct, but I'm still getting this at runtime:
    Exception in thread "main" java.awt.AWTError: BoxLayout can't be shared
    Anyone have any ideas?

  • Vertical allignment of columns in tabular format of report in obiee 10g

    Hi,
    I have a client requirement in which the colums are to be alligned vertically instead of being displayed horizontallty which is the default format in obiee.
    Can anyone help me in achieving this requirement .
    below goes the format of report we need in our project :
    Column Name Value
    Trade Summary:     
    Counterparty:     [Counterparty Name]
    Trade ID/ Global ID:      [Trade ID / Global ID]
    Trade Date:     [MM/DD/YYYY]
    Settlement Date:     [MM/DD/YYYY]
    Notional:     [CCY2] [Notional] <- show the non delivery currency
    Thanks,
    Mayuri Shah

    Hi,
    Change the columns as rows and rows as columns in the pivot view properties.You can display all the columns as rows and data as columns.
    If you want display the column data in sections place required columns in section .
    mark if helpful/correct..
    thanks,
    prassu

  • GUI_DOWNLOAD fn module text allignment problem

    Hi
    I have a problem while downloading data from internal table to presentation server filepath using GUI_DOWNLOAD fn module.
    For me the requirement is to display each field data at a fixed location in a DAT file (notepad) for all lines irrespective of any delimiter.
    Now data of ech field is getting displayed continuously after its preceeding field with the specified delimiter. I want to fix the location of each field at a particular point for all lines in the file after download.
    Is there any other fn module for this or any change in the parameters for fixing the field positions in the output file ?
    Harsha

    Hi Vinod
    I have tried your way solution also. Still my problem is not solved.
    Present Output:
    test test     E12EDWQD     0000110.000
    venky kirupa test case- final se     87549-8655-9     0000110.000
    Vetri Velan     SAFETWT     0000961.540
    Amount fieilds(last field) of each line  need to be alligned one below the other starting from same position in all lines. At present its all random based on the length of previous field.
    Harsha.

  • JPanel won't display in BoxLayout when adding components in different order

    For some reason when I run this code, the topPanel (made up of two panels which are all JLabels, JButtons, and JTextFields) does not display on the screen, but the investmentPanel (JTable within a JScrollPane) does. But when I add them in the reverse order, they both show up, but not in the order I want them to. The JPanel I am adding to is maximized so that shouldn't be an issue. Any thoughts of why this is happening?
    this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));
    topPanel.add(companyInfoPanel);
    topPanel.add(tradePanel);
    add(topPanel);
    add(investmentPanel);

    Your best bet here is to show us your code. We don't want to see all of it, but rather you should condense your code into the smallest bit that still compiles, has no extra code that's not relevant to your problem, but still demonstrates your problem, in other words, an SSCCE (Short, Self Contained, Correct (Compilable), Example). For more info on SSCCEs please look here:
    http://homepage1.nifty.com/algafield/sscce.html

  • Error in smartform japaneese output allignment when we get thatby email.

    Hi ALL ,
    I am getting the following output when i am sending an email .
    I am using a smartform for that display.
    My problem is field allignment as shown in the below records.
    Because of small characters in japaneese language we are not getting the proper way of the below fields:
    Requirement: I have to arrange all the right side part the same way as the left part.
       貴社注文番号:                 A0012634-1
       受注処理日:                  23.05.2006
       弊社受注番号:                 7050808206
       弊社受注入力日:                23.05.2006
       変更日付:
       受注元:                    新日軽ベストシステム (株) 管理部
        通貨:                     JPY
       支払い条件:                  Close EoM/1 mo./Payment EoM
    Please suggest ur feedback to solve the issue .
    Thanks In advance.

    hi,
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data = wa_doc_chng" check your language given.
            put_in_outbox = 'X'
          TABLES
            packing_list  = i_objpack
            object_header = wa_objhead
            contents_bin  = i_objbin
            contents_txt  = i_objtxt
            receivers     = i_reclist.
    here in the exporting parameter, which language u gave...
    Any japanese letter is printing in your e-mail.. ???
    hope this will help you..
    regards
    vijay

  • Error in smartform japaneese output allignment

    Hi experts,
    I am getting the following output when i am sending an email .
    I am using a smartform for that display.
    My problem is field allignment as shown in the below records.
    Because of small characters in japaneese language we are not getting the proper way of the below fields:
    Requirement: I have to arrange all the right side part the same way as the left part.
    貴社注文番号: A0012634-1
    受注処理日: 23.05.2006
    弊社受注番号: 7050808206
    弊社受注入力日: 23.05.2006
    変更日付:
    受注元: 新日軽ベストシステム (株) 管理部
    通貨: JPY
    支払い条件: Close EoM/1 mo./Payment EoM
    for example :
    通貨: JPY
    受注処理日: 23.05.2006
    should be like
    通貨:                JPY
    受注処理日:      23.05.2006
    Both J and 2 should be in the same line.
    Pelase suggest how we can handle dis issue?
    One more thing , here we r looking the output in SOST and through email also .
    So the output should be same in both.
    Please suggest ur feedback to solve the issue .
    Thanks In advance.
    RAhul
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 8, 2009 3:24 PM

    create a template with two columns and as many rows as u want and print ur text in that.
    Edited by: kartik tarla on Jan 9, 2009 2:02 AM

  • Add a JLabel below a JTextArea in a boxlayout

    I have a JTextArea in a JScrollPane in a GUI, and I'm using BoxLayout. Occasionally, I wish to add a JLabel to my JScrollPane, which works fine.
    However, since my BoxLayout is set to the Y_Axis layout, the JLabel always ends up being centered below the JTextArea, and I want it, as well as the JTextArea, to be aligned to the left. I know there is a LEFT_ALIGNMENT operator, but I am unsure of how to use it, although I've read the API for java.awt.Component.
    Also, my JTextArea has a maximum column size, but when the JLabel is displayed, the JTextArea stretches across my entire JScrollPane window. I've tried setting a maximum size, but for some reason that tends to cut off some text on the left side of the JTextArea.
    The JLabel will almost always be wider than the JTextArea. Perhaps that is causing some problems with BoxLayout?
    If there's any more information I should provide, please let me know.
    Thanks for any help you can provide,
    Dan
    Message was edited by:
    Djaunl

    Ok I figured out how the align the JLabel to the left:
    myJLabel.setAlignmentX(Component.LEFT_ALIGNMENT);However, I'm having an odd problem with my JTextArea. If my GUI displays the text normally, everything is fine. But once I add a JLabel to my JScrollPane that is wider than the view (i.e. so I need to scroll horizontally to see the entire JLabel), when I load more text, the text will not position itself within the JScrollPane view, and I will have to scroll over to see all of the text, which I do not want to do.
    Is there a way to keep the JTextArea at the same maximum column number, even though there is a JLabel below it that is much wider than the JTextArea should be?
    I get the feeling this isn't making sense. Here's the code to create my components:
    // Create min/max dimensions
              Dimension minimumSize = new Dimension(200, 500);
              Dimension maximumSize = new Dimension(500, 500);
                    Dimension buttonSize = new Dimension (125, 20);
                    int cols = 30;
              // Create Tree viewing pane
              JScrollPane treeView = new JScrollPane(tree);
              treeView.setMinimumSize(minimumSize);
              treeView.setMaximumSize(maximumSize);
              // Create HTML viewing pane 1
              final JPanel htmlView1 = new JPanel();
                    BoxLayout BL = new BoxLayout(htmlView1, BoxLayout.Y_AXIS);
                    htmlView1.setLayout(BL);
                    final JScrollPane htmlPane = new JScrollPane(htmlView1);
              htmlPane.setMinimumSize(minimumSize);
              htmlPane.setMaximumSize(maximumSize);
                    // Create text area1
                    final JTextArea textArea1 = new JTextArea();
                    textArea1.setLineWrap(true);
                    textArea1.setWrapStyleWord(true);
                    textArea1.setColumns(cols);
                    textArea1.setAlignmentX(Component.LEFT_ALIGNMENT);
                                            JLabel pic = new JLabel (new ImageIcon(new URL(DBQuery.list.get(1))));
                                            pic.setAlignmentX(Component.LEFT_ALIGNMENT);
                                            htmlView1.add(pic);Later in the code, I add textArea1 to htmlView1.
    I'm sorry if this is very confusing. If there is anything I can do to help, please let me know.

  • How to create a jdialog with boxlayout

    Hi,
    I was trying to create a jdialog as simple as plsql login dialog. In attempt to learn how should I proceed I downloaded and modified BoxLayoutDemo.java that is available from java's swing tutorial site:
    * BoxLayoutDemo.java is a 1.4 application that requires no other files.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class BoxLayoutDemo {
        static JDialog jdlg;
        public static void addComponentsToPane(Container pane) {
            pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
            addTextField(pane);
            addAButton("Button 1", pane);
            addAButton("Button 2", pane);
            addAButton("Button 3", pane);
            addAButton("Long-Named Button 4", pane);
            addAButton("5", pane);
        private static void addAButton(String text, Container container) {
            JButton button = new JButton(text);
            button.setAlignmentX(Component.CENTER_ALIGNMENT);
            container.add(button);
        private static void addTextField(Container container) {
            JTextField txt = new JTextField(20);
            //txt.setMaximumSize(new Dimension(100,20));
            txt.setPreferredSize(new Dimension(100,10));
            txt.setAlignmentX(Component.RIGHT_ALIGNMENT);
            //Border padding = BorderFactory.createEmptyBorder(20,20,5,20);
            //txt.setBorder(padding);
            container.add(txt);
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("BoxLayoutDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Set up the content pane.
            jdlg = new JDialog(frame);
            addComponentsToPane(jdlg.getContentPane());
            //Display the window.
            frame.pack();
            frame.setVisible(true);
            jdlg.setPreferredSize(new Dimension(200,200));
            jdlg.pack();
            jdlg.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }The funniest thing is every thing except the text box is ok. With or without the text box the buttons are shown appropriately i mean they dont stretch. But in case of the text field it seems like that the height of the textfield becomes 60 instead of 20. if I use txt.setMaximumsize(new Dimension(100,20)) then everything seems ok.
    Now it seems like swing has some fetish about textfields. Because even if I dont specify the size of the buttions they dont stretch themsleves but even if I specify the size of the text field and make it the first element so that the last element gets stretched if necessary without affecting it, it will defy the size instruction.Layout managers are really amazing!!!!!!!! and so helpful!!!!!!!!!

    not really sure what effect you want, but try this
        private static void addTextField(Container container) {
            JTextField txt = new JTextField(20);
            //txt.setMaximumSize(new Dimension(100,20));
            txt.setPreferredSize(new Dimension(100,10));
            txt.setAlignmentX(Component.RIGHT_ALIGNMENT);
            //Border padding = BorderFactory.createEmptyBorder(20,20,5,20);
            //txt.setBorder(padding);
            JPanel p = new JPanel();//<-------------
            p.add(txt);//<-------------
            //container.add(txt);//<-------------
            container.add(p);//<-------------
        }

  • Whoever updated BoxLayout must not know how to program in Java

    Why would you allow anyone to update their source that doesn't know what they are doing.
    Notice that BoxLayout is non-consistent with any other layouts.
    i.e. Why do you think that JPanel allows you to create a Layout when instantiating the object?.
    The way it is now, you have to call another method.
    Yeah, one method might not make a difference in performance but all the inconsistencies add up. Overhead....
    Yeah, I am the one that you screwed over - but whatever!
    Edited by: cosmic_string on Mar 6, 2008 5:55 PM
    Edited by: cosmic_string on Mar 6, 2008 5:56 PM

    I doubt that admin would read your concerns.
    This is not the appropriate forum to post this.

  • How to allign an apDiv with the template centre alligned?

    Hi,
    I am trying to create a website in Adobe Dreamweaver CS4 but made a website template in Adobe Fireworks which was then imported in. My template was then center alligned with the apDivs placed on it containing all the links/images/rolloevers etc.
    When I viewed my website in the browser; the apDivs were all to the left while the template was in the center.
    Does anyone know how to I can make all my apDiv's alligned in the centre of the page so they are in the correct place on the template?
    Thanks

    Megan - here's the problem with doing it that way (perhaps your instructor will be interested):
    Fireworks (or Photoshop) are actually VERY good at replicating your layout in an HTML page. And that's part of the problem. They are too good. As soon as you begin to add NON graphic information to the page, the layout will pull apart forming gaps between the graphics and the text regions. This is very unsightly and unsuitable for the web. In addition, after you add text, if things still look good, don't congratulate yourself yet. Now try increasing the text display size in your browser. Things will go to pot in a hurry when you do that.
    Perhaps, though the most troubling aspect of this is that the code that FW uses for the layout is not only table-based (that's so 90's), but also it's invalid HTML. As you might imaging, you willl spend far more time on triage for the broken layouts than you would have spent to do it the right way to begin with.
    We all complained so bitterly to Adobe about this ridiculous situation that they finally took it out. Good riddance, I say.

  • BoxLayout

    Is it posible to use fillers( Box.Filler) in other layouts than boxlayout?

    itemTitleTextField = new JTextField (10);//<--change to 10, visibly smaller, change back later
    newItemDescriptionPanel.add (secondCategoryAnimalCheckBox);
    newItemDescriptionPanel.add (blankLabel);
    newItemDescriptionPanel.add (itemTitleLabel);
    JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
    p.add(itemTitleTextField);//<--add textfield to panel
    newItemDescriptionPanel.add (p);//<--add panel to boxlayout panel

Maybe you are looking for