Button Alignment in a TreeView

How can I right-alline Buttons in a TreeView.
I have this:
http://i44.tinypic.com/2reilhz.jpg
but want this:
http://i44.tinypic.com/33xc1ua.jpg
I am trying to achieve this with a special TreeCell implementation and using a HBox as the container for the Button
and overwriting the updateItem:
            protected void updateItem(CassetteItem item, boolean empty) {
                super.updateItem(item, empty);
                if (empty) {
                    setText(null);
                    setGraphic(null);
                } else {
                    setText(item.toString());
                    setGraphic(hBox);
(I am using the latest JavaFX 2 bundled with JDK7.)

It works when using an AnchorPane instead of HBox:
AnchorPane anchorPane = new AnchorPane();
anchorPane.getChildren().addAll(itemName, button);
AnchorPane.setRightAnchor(button, 10.0);

Similar Messages

  • Button alignment

    Hello all,
    I am new to the JAVA programming language. I need to write an applet that will display ten buttons at the bottom of the screen. I have looked everywhere but have found nothing about button alignment. Could someone please point me in the write direction? My code so far is below. Thanks in advance.
    import java.awt.*;
    import java.applet.*;
    public class Floys extends Applet
         Button Start, Pause, Stop, Properties, Slower;
         Button Behavior ,Faster, Default, Stranger, Quit;
         Panel bot;
         public void init()
              bot = new Panel();     
              add(bot);
              Start = new Button("Start");
              Pause = new Button("Pause");
              Stop = new Button("Stop");
              Properties = new Button("Properties");
              Slower = new Button("Slower");
              Behavior = new Button("Behavior");
              Faster = new Button("Faster");
              Default = new Button("Default");
              Stranger = new Button("Stranger");
              Quit = new Button("Quit");
              bot.add(Start);
              bot.add(Pause);
              bot.add(Stop);
              bot.add(Properties);
              bot.add(Behavior);
              bot.add(Slower);
              bot.add(Faster);
              bot.add(Default);
              bot.add(Stranger);
              bot.add(Quit);
         }

    you need to use Borderlayout to do this...
    import java.awt.*;
    import java.applet.*;
    public class Floys extends Applet
    Button Start, Pause, Stop, Properties, Slower;
    Button Behavior ,Faster, Default, Stranger, Quit;
    Panel bot;
    public void init()
    // set the layout of applet to Border layout like this
    // by default applet uses FlowLayout
    this.setLayout(new BorderLayout());
    bot = new Panel();
    Start = new Button("Start");
    Pause = new Button("Pause");
    Stop = new Button("Stop");
    Properties = new Button("Properties");
    Slower = new Button("Slower");
    Behavior = new Button("Behavior");
    Faster = new Button("Faster");
    Default = new Button("Default");
    Stranger = new Button("Stranger");
    Quit = new Button("Quit");
    bot.add(Start);
    bot.add(Pause);
    bot.add(Stop);
    bot.add(Properties);
    bot.add(Behavior);
    bot.add(Slower);
    bot.add(Faster);
    bot.add(Default);
    bot.add(Stranger);
    bot.add(Quit);
    add(bot,BorderLayout.SOUTH)
    good luck !
    vinod

  • Button aligned to left size

    Hi All,
    the code below suppose to show a list with a few buttons below.
    in this dialog i have only minor problem.
    The problem is that all my buttons aligned to left size.
    if i omit line number 193 (jButtonPane.setLayout(new GridLayout(1,nOfButtons,1,1))),
    it centralized but i am loosing the behaviour of the buttons.
    when i shrinking the dialog the button dissapear:
    and i need that the button will show like:
    [OK...] [Cancel...] etc...
    how can i centralized the buttons and still not "lost" the buttons.
    this is my code:
    package test;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.GraphicsEnvironment;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultListModel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class DialogFrame {
         String Message2Show="Default Message";
         JButton[] ButtonArray;
         String [] btnArrayText;
         String [] lineArray;
         String Title;
         int nOfButtons;
         int nOfLines;
         String[] data;
         private JPanel jContentPane = null;
         private JPanel jButtonPane = null;
         private JPanel jmessagePane = null;
         private JList MessageList=null;
         private JScrollPane jScrollPane = null;
         private JPanel jPanel2 = null;
         private DefaultListModel listModel;
         private static int DialogWidthPreferedSize=500;
         private static int DialogHightPreferedSize=200;
         final static boolean shouldFill = true;
        final static boolean shouldWeightX = true;
        final static boolean RIGHT_TO_LEFT = false;
          //Specify the look and feel to use.  Valid values:
        //null (use the default), "Metal", "System", "Motif", "GTK+"
         final static String LOOKANDFEEL = "System";
         public DialogFrame() {
              // TODO Auto-generated constructor stub
            // creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
         public DialogFrame(String message) {
              // TODO Auto-generated constructor stub
              ParseMessage(message);
            //          for test add data
              AddData2Message();
               //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
            private void createAndShowGUI() {
                 initLookAndFeel();
                //Make sure we have nice window decorations.
                JFrame.setDefaultLookAndFeelDecorated(true);
                //Create and set up the window.
                JFrame frame = new JFrame(Title);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                //Display the window.
                int maxHeight = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getDisplayMode().getHeight();
                int maxWidth = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getDisplayMode().getWidth();
                frame.pack();
                frame.setSize(DialogWidthPreferedSize, DialogHightPreferedSize);
                frame.setLocation(GetWidth(maxWidth),GetHeight(maxHeight));
                frame.setContentPane(getJContentPane());
                frame.setVisible(true);
             private  void initLookAndFeel() {
                String lookAndFeel = null;
                if (LOOKANDFEEL != null) {
                    if (LOOKANDFEEL.equals("Metal")) {
                        lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
                    } else if (LOOKANDFEEL.equals("System")) {
                        lookAndFeel = UIManager.getSystemLookAndFeelClassName();
                    } else if (LOOKANDFEEL.equals("Motif")) {
                        lookAndFeel = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
                    } else if (LOOKANDFEEL.equals("GTK+")) { //new in 1.4.2
                        lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
                    } else {
                        System.err.println("Unexpected value of LOOKANDFEEL specified: "
                                           + LOOKANDFEEL);
                        lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
                    try {
                        UIManager.setLookAndFeel(lookAndFeel);
                    } catch (ClassNotFoundException e) {
                        System.err.println("Couldn't find class for specified look and feel:"
                                           + lookAndFeel);
                        System.err.println("Did you include the L&F library in the class path?");
                        System.err.println("Using the default look and feel.");
                    } catch (UnsupportedLookAndFeelException e) {
                        System.err.println("Can't use the specified look and feel ("
                                           + lookAndFeel
                                           + ") on this platform.");
                        System.err.println("Using the default look and feel.");
                    } catch (Exception e) {
                        System.err.println("Couldn't get specified look and feel ("
                                           + lookAndFeel
                                           + "), for some reason.");
                        System.err.println("Using the default look and feel.");
                        e.printStackTrace();
             private JPanel getJContentPane()
                  if (jContentPane == null) {
                       jContentPane = new JPanel();
                       jContentPane.setLayout(new BorderLayout());
                       //FOR THE LIST
                       jContentPane.add(getMessagePanel(), BorderLayout.CENTER);
                    //FOR THE BUTTONS
                       jContentPane.add(getButtonPanel(), BorderLayout.SOUTH);
                  return jContentPane;
            /*******      FOR THE LIST    **********/
             private JPanel getMessagePanel()
                  if (jmessagePane == null)
                       jmessagePane = new JPanel();
                       jmessagePane.setLayout(new GridLayout(1,0));
                       jmessagePane.add(getJScrollPane(), null);
                  return jmessagePane;
             private JScrollPane getJScrollPane() {
                  if (jScrollPane == null) {
                       jScrollPane = new JScrollPane();
                       jScrollPane.setViewportView(getMessage());
                  return jScrollPane;
             private JList getMessage() {
                  if (MessageList == null) {
                       MessageList = new JList(listModel);
                       MessageList.setBackground(Color.cyan);
                  return MessageList;
              /*******      FOR THE BUTTON    **********/
             private JPanel getButtonPanel()
                  if (jButtonPane == null)
                       jButtonPane = new JPanel();
                       jButtonPane.setLayout(new GridLayout(1,nOfButtons,1,1));//test
                       jButtonPane.add(getJPanel2(),null);
                  return jButtonPane;
             private JPanel getJPanel2()
                  if (jPanel2 == null)
                       jPanel2 = new JPanel();
                       jPanel2.setLayout(new GridLayout(0,nOfButtons));
                       //Cretae Buttons Dynamically Regard user request
                       ButtonArray=new JButton[nOfButtons];
                       //Crteate Button objects
                       for(int i=0;i<nOfButtons;i++)
                            getButton(btnArrayText,i);
                   //add buttons to panel
                   for(int i=0;i<nOfButtons;i++)
                        jButtonPane.add(ButtonArray[i]);
              return jPanel2;
         private JButton getButton(String Text,int ind) {
              ButtonArray[ind] = new JButton(Text);
              ActionListener l = new ActionListener()
    public void actionPerformed(ActionEvent e)
    JButton SelectedButton = (JButton)e.getSource();
    String ac = SelectedButton.getActionCommand();
    MyActionEvents(ac,SelectedButton);
    ButtonArray[ind].setActionCommand(String.valueOf(ind + 1));
    ButtonArray[ind].addActionListener(l);
              return ButtonArray[ind];
         private int GetWidth(int maxWidth){
              int x=0;
              x=(maxWidth/2)-(DialogWidthPreferedSize/2);
              return x;
         private int     GetHeight(int maxHeight){
              int y=0;
              y=(maxHeight/2)-(DialogHightPreferedSize/2);
              return y;
         void ParseMessage(String message)
              Title="";
              String value="";
              int loc;
              /*****************TITLE TREATMENT*********************/
              for ( loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++)
                   Title += message.charAt(loc);
              //Title += ":";
              /*****************BUTTON TREATMENT*********************/
              message = (message.substring(loc+1)).trim();
              value = "";
              for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
              nOfButtons=Integer.parseInt(value);
              btnArrayText=new String[nOfButtons];
              for (int i=0; i<nOfButtons; i++)
                   message = (message.substring(loc+1)).trim();
                   value = "";
                   for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
                   btnArrayText[i] = value;
              /*****************TEXT TREATMENT*********************/
              message = (message.substring(loc+1)).trim();
              value = "";
              for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
              nOfLines = Integer.parseInt(value);
              lineArray = new String[nOfLines];
              for (int i=0; i<nOfLines; i++) {
                   message = (message.substring(loc+1)).trim(); value = "";
                   for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
                   lineArray[i]=value;
         private void MyActionEvents(String actionCommand,JButton SelectedButton)
              int val;
              val=Integer.parseInt(actionCommand);
              switch(val)
              case 1:
                   System.out.println("ac = " + actionCommand);
              break;
              case 2:
                   System.out.println("ac = " + actionCommand);
              break;
              case 3:
                   System.out.println("ac = " + actionCommand);
              break;
              case 4:
                   System.out.println("ac = " + actionCommand);
              break;
              case 5:
                   System.out.println("ac = " + actionCommand);
              break;
              case 6:
                   System.out.println("ac = " + actionCommand);
              break;
              case 7:
                   System.out.println("ac = " + actionCommand);
              break;
              case 8:
                   System.out.println("ac = " + actionCommand);
              break;
              int size = listModel.getSize();
    String Name=SelectedButton.getText();
    listModel.insertElementAt(Name,size);
         //For testing
         private void AddData2Message()
              listModel = new DefaultListModel();
              data=new String[lineArray.length];
              for(int i=0;i<lineArray.length;i++)
                   listModel.addElement(lineArray[i]);
    Tia
    Gabi

    The arrow to open the tab history of the Back and Forward buttons has been removed in Firefox 4 and later.
    Use one of these methods to open the tab history list:
    * Right click on the Back or Forward button
    * Hold down the left mouse button on the enabled Back or Forward button until the list opens
    You can look at this extension:
    * Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/

  • Button alignment issue - it should inherit I think

    HI,
      I'm on DW CS4 on an intel Mac. I've got a sticking point with an Email button that runs a mailto link. This button seems to only center correctly in IE 6. (For my site, I'm using templates from the Dreamweaver CSS templates that I've customized for my own use. ) 
    The 'Container' which this button is in, is set to text-align:center and I've put 'text-align:center' into the button's attributes. And yet in Firefox and Safari and IE 7, the button hangs left every time.
    http://www.frankbright.com/Contact.htm
    I have tried setting a rather large left margin for the button, but then it looks fine in the other browsers and it looks all screwy in IE 6.0.
    Is there a happy ending to this dilemma? I do appreciate any help if anyone could offer some,
    Many Thanks, Frank B.
    BTW, I am now - thanks to DW CS4 templates - table-free in my site (with one understandable exception: a DW-generated web gallery table; maybe some day on that one). If I can do it, anyone can!  I have to brag somewhere or sometime on this, so it's right now I guess.

    It may be that those browsers are interpreting your image as...an image...not as text, so text-align is not applying. If you give your image a display: block; then a margin: 0 auto; it will center in your space.
    Good job getting free of the tables...DW layouts are a nice help in that direction, and good learning aids at the same time.
    Beth

  • Button Alignment Issue

    I have some custom buttons added to the sales order screen.  When the font in B1 is set to "10", the buttons show up and are aligned just fine.  When the user changes the font to anything other than "10", the buttons become mis-aligned and moved on the form even though I am setting the "Left" property to be the same for all three of them.
    Also, on some computers, when the user minimizes the sales order form and then restores the form, all items  (even system items) don't resize correctly and the sales order matrix shrinks to about 1/2 the size it was before, leaving a huge empty space on the form.  When the add-on is closed, the issue goes away.  I am not changing any properties on the system items or the form (width, height etc).  I'm just adding three custom buttons and filtering for certain events on the form.
    Any ideas?
    Thanks!
    Message was edited by: Curtis Fry

    Curtis,
    Did you follow the Standards and Guidelines UI documentation when creating your controls and forms?  I am assuming that you did, but there are specifics with respect to the creation of buttons on forms?  With other add-ons that you have created, have you experienced this issue?
    This is a note from the PartnerEdge Portal that you may want to check out to see if this helps ...
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000655552
    Let me know,
    Eddy

  • Firefox Problems with Flash Button alignment

    Hey Forums,
    I am using Dreamweaver CS3, for a website. For the page I
    used a 3 column elastic with header and footer.
    On the left sidebar I have four flash buttons, and whenever I
    preview the page in Mozilla Firefox, the upmost button for some
    reasons aligns to the right. I have no alignment settings set, and
    the alignment for the sidebar is set to left. It only happens in
    Firefox, not Safari nor Internet Explorer. I attached the code, if
    you need anymore info, ask.

    >
    http://www.faithdesigner.net/www.faithdesigner.net/pricing.html/www.faithdesig
    > ne
    > r.net
    In the dialog box for the Flash Button, in the link box, put
    the full
    absolute path if an external page. Including the
    http:// part.
    http://www.example.com/page.html
    for pages inside your site- use the browse to file icon, and
    use a relative
    path.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Horizontal Button Alignment

    Hi All,
    By default the Save, Cancel, etc buttons are aligned vertically when a form region is created. How do i align them horizontally?
    Thanks
    Mc.Kenzie

    As Re: APEX 4.0 Region Height, provide as much relevant information as possible in order for others to understand&mdash;and potentially replicate&mdash;the problem. Theme, template and browser may all be relevant here. Of primary importance is whether the buttons are region buttons or item buttons?
    As also suggested in the other thread, reproducing the problem at apex.oracle.com eliminates the need to play 20 Questions here...

  • ITS MOBILE: Button alignment after EHP7 upgradation

    Hi Experts,
    After EHP7 upgradation, ITS mobile buttons are not aligned. But in dialog programming it shows correctly. But in service/scanner it shows not correctly
    How to correct the aligment?
    Thanks with Regards,
    Vallamuthu M

    retrive the screen configuration which is in before ehp7.
    Thanks with Regards,
    Vallamuthu M

  • Orientation change button align from right to left

    Hi,
    On vertical view I want the button to be aligned to the right,
    and when is horizontal, align the button to the left
    I have put this code in the orientationchange event:
    if(window.innerHeight > window.innerWidth){
        sym.$("btnDeal").css('right', '10px');  // vertical
    } else {
       sym.$("btnDeal").css('left', '80px');  // horizontal
    I open the site in vertical mode, button looks good,
    change orientation to horizontal then the button change position, looks good
    now I put vertical again, this time the button is wrong, it stayed to the left, should go to the right.
    any change in the orientation the button keeps to the left
    please help, What Im doing wrong?
    thanks

    Please don't do that: https://wiki.archlinux.org/index.php/Fo … te#Bumping

  • Command buttons align differently on different emulators

    Hi,
    I have created some commands at a screen like
    BACK
    HELP
    EXIT
    But the doubt is when the application run on different emulators, the commands will locate differently..
    example:
    nokia:
    BACK at the left, HELP at the middle, EXIT at the right
    sony ericsson:
    BACK at the left, HELP + EXIT will be at the right (menu)
    How can i configure the commands locate at the place that i wish to?

    You can't. Different devices, have different locations for their command. And that will always be the case.

  • Tabstrip's Push buttons are align by left in 1 place

    Hi experts
       I put a Tabstrip in my screen,but his Push buttons are align by left in 1 place,How can i do something to make the push buttons align 1 by 1.
    BR
    Chris huang

    Those MM Rollover Menus are awful.  I'm not surprised you're having trouble with them.
    The Sordid tale of MM Fireworks Menus
    http://losingfight.com/blog/2006/08/11/the-sordid-tale-of-mm_menufw_menujs/
    The best advice I can offer is to scrap the MM Rollovers you have now and use a good CSS Menu system.
    DW Spry Menus
    http://layersmagazine.com/spry-navigation-dreamweaver.html
    CSS Express Drop-Down Menus  (tutorial)
    http://www.projectseven.com/tutorials/navigation/auto_hide/
    List-O-Rama  (Free DW Extension)
    http://www.dmxzone.com/go?5618
    Pop-Menu  Magic2 by PVII (paid DW extension)
    http://www.projectseven.com/products/menusystems/pmm2/index.htm
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Submit button on the align RIGHT

         How do I configure SUMBIT button align on the RIGHT?
    https://adobeformscentral.com/?f=htqvZrOU2kz3MeZD-kmuWg
    Thanks!

    Sorry this is not something you can configure. The submit button on online form is always on the left.
    Gen

  • Placing buttons in a region displaying an Interactive Report

    Hi,
    I have a page on which I am displaying an interactive report.I would like to place buttons on this region where the report is displayed-
    - The first button right of the search bar of the interactive report
    - The second button right of the first button.
    - The third (exactly ) below the second button (still right of the search bar)
    I am aware that if this where an HTML region,then I would have had the flexibility to place the third button in a new line without a problem,but can I achieve this in a region displaying an interactive report?
    Is there any way to do this?
    Regards,
    Priya Jetley

    Create the buttons as region buttons in the IR region, with the following properties:
    Button Position: Right of Interactive Report Search Bar
    Button Alignment: Left Right
    Enter *style="display: block; float: right;"* in the Button Attributes of the third button.
    Edited by: fac586 on Nov 11, 2008 8:04 AM
    Changed to fix slight layout glitch in Firefox 2.
    Edited by: fac586 on Nov 11, 2008 9:06 AM
    Changed back as the slight glitch in FF2 is preferable to not working in FF3 and Safari

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

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

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

  • JTextField/JTable-cell Button

    Is there any known efficient methods of creating the JTextField or JTable-cell Button as like in Forte's Component Inspector window where you click on the property value field and the value is displayed just left of a small button labelled "..." ie: [some text field with value][...] also referred to as the "ellipsis" buttons, or will most answers to this question simply describe the layout of a JField-JButton combination? The action from clicking on the [...] button aligned right of the JTextField simply invokes or displays a larger input interface in which upon completion of the entered data, returns the input to the related JTextField.
    Thanks to anybody for any help with this, and perhaps in return, I may be able to answer any non-gui java questions, or some not so unfamilliar GUI questions.

    Hello StanislavL and Lutianxiong,
    I remember asking this question some time ago, and the time has come again for me to seek this functionality. I have finally achieved the functionality and thought I would post the answer for anybody else. I had not realized that I had recieved a solution/reply to my original question as I come here to post the answer, and in fact, my solution does appear to be very similiar to your reply, StanislavL. As for you, Lutianxiong and other seekers of this info, here is my solution with a JFileChooser style input for the 3rd column which only shows gif,jpg and png files:
    <code>
    ------------- TableCellFileInput.java -------------------
    public class TableCellFileInput extends javax.swing.JPanel {
    private String extensions[];
    public TableCellFileInput(String fileExtensions[]) {
    extensions = fileExtensions;
    self = this;
    initComponents();
    private void initComponents() {
    valueField = new javax.swing.JTextField();
    fileButton = new javax.swing.JButton();
    setLayout(new java.awt.BorderLayout());
    valueField.setText("jTextField1");
    add(valueField, java.awt.BorderLayout.CENTER);
    fileButton.setText("...");
    fileButton.setMargin(new java.awt.Insets(0, 2, 0, 2));
    fileButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    fileButtonActionPerformed(evt);
    add(fileButton, java.awt.BorderLayout.EAST);
    private void fileButtonActionPerformed(java.awt.event.ActionEvent evt) {
    String filePath = valueField.getText();
    if(filePath != null && filePath.length() > 0) {
    filePath = new java.io.File(filePath).getParent();
    javax.swing.JFileChooser chooser
    = new javax.swing.JFileChooser(filePath);
    chooser.setFileFilter(new ImageFilter());
    int returnVal = chooser.showOpenDialog(this);
    if(returnVal == javax.swing.JFileChooser.APPROVE_OPTION) {
    valueField.setText(chooser.getSelectedFile().getAbsolutePath());
    class ImageFilter extends javax.swing.filechooser.FileFilter {
    public boolean accept(java.io.File f) {
    if(f.isDirectory()) return true;
    String fName = f.getName();
    if(extensions != null) {
    for(int i=0;i<extensions.length;i++) {
    if(fName.endsWith(extensions[ i ])) return true;
    return false;
    public String getDescription() {
    return DESCRIPTION;
    class CustomCellEditor extends javax.swing.AbstractCellEditor
    implements javax.swing.table.TableCellEditor {
    public Object getCellEditorValue() {
    return valueField.getText();
    public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, Object value, boolean isSelected, int row, int column) {
    System.out.println("fileEditor");
    if(value == null) valueField.setText("");
    else valueField.setText(value.toString());
    return self;
    public void setColumn(javax.swing.table.TableColumn column) {
    column.setCellEditor(new CustomCellEditor());
    private javax.swing.JButton fileButton;
    private javax.swing.JTextField valueField;
    private static final String DESCRIPTION = "Image File Filter";
    private java.awt.Component self;
    ------------- TestTable .java -------------------
    public class TestTable extends javax.swing.JFrame {
    public TestTable() {
    editorField = new javax.swing.JTextField();
    String fileExts[] = {"gif","jpg","png"};
    fileEditorField = new TableCellFileInput(fileExts);
    initComponents();
    javax.swing.table.TableColumn column
    = jTable1.getColumn("Title 3");
    fileEditorField.setColumn(column);
    private void initComponents() {
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
    exitForm(evt);
    jTable1.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    {null, null, null, "cats"},
    {null, null, null, "dogs"},
    {null, null, null, "mice"},
    {null, null, null, "birds"}
    new String [] {
    "Title 1", "Title 2", "Title 3", "Title 4"
    Class[] types = new Class [] {
    java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.String.class
    public Class getColumnClass(int columnIndex) {
    return types [columnIndex];
    jScrollPane1.setViewportView(jTable1);
    getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);
    private void exitForm(java.awt.event.WindowEvent evt) {
    System.exit(0);
    public static void main(String args[]) {
    new TestTable().show();
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField editorField;
    private TableCellFileInput fileEditorField;
    </code>

Maybe you are looking for

  • N80 Bug?!! Help, please...

    Hi, in the menu, there's a folder called gallery, (in which are the photos, music, videos,etc...) i don't know how, but i've changed the name of this folder, while i was making a new folder, and now i can't change the name back... I know that changin

  • Send and load

    i have checked google and found horrible incomplete examples in using send and load XML with php. I have spent an hours on this and nothing. Unless i can get ha;f decent example with this i think I might confine XML to the dustbin. This has been horr

  • Printing to Shared Windows XP Printer

    Windows XP, SP2, latest patches with a USB conected HP 2550L printer, shared PostScript Driver. Unix printing extensions added, TCP/IP service Automatic and Started I first selected the printer via Windows Printing, selected workgroup, the PC and the

  • Deleting Indexes Job failing with ORA-01418

    Hi, While deleting the indexes to the Infocube the job is failing with an Error: ORA-01418. In SM37 it is throwing the message SQL-Error ORA-01418 specfied Index does not exist. Checked in RSRV for the InfoCube it is showing red while we execute for

  • There is a calendar event on my iphone that I can't remove. It doesn't show up on my calendar on my Mac. Help!

    My iphone calendar is set to sync with my calendar on my Mac. However, there is an old recurring event that continues to appear on my iphone, although I've deleted it from my calender on my Mac. I can't figure out how to delete it on my iphone. Any s