JDialog sizing problems

First of all, just let me say I have read everything there is available on layout managers and how pack() and validate() work.
My problem is simply that my JDialog appears far longer than its components, and I can't see why.
I've created screenshots of the desired appearance and the actual appearance:
http://www.komododave.co.uk/gallery/main.php?g2_itemId=167
The first 'undesired' screenshot shows what the JDialog looks like upon instantiation. The second shows what it looks like once you manually shrink it in the Y direction by more than about 10 pixels.
I don't understand how the maximum size can exceed the Dimension I set with 'dialog.setMaximumSize(...', since I'm using BoxLayout for the JDialog and that respects a given maximum size.
The constructor creating the JDialog is shown here:
          public AbstractSelectionDialog(Vector<String> argVector, String title,
                    String message) {
               Vector<String> vector = argVector;
               // create new modal JDialog
               final JDialog dialog = new JDialog(Silk.getFrame(), title, true);
               // set boxlayout for dialog frame
               dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(),
                         BoxLayout.Y_AXIS));
               // set default close operation
               dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
               // create ButtonGroup to enforce exclusive collection choice
               final ButtonGroup buttonGroup = new ButtonGroup();
               // initialise other components
               // use fake space for label rather than use another HorizontalGlue
               JLabel label = new JLabel("   " + message);
               // panel containing collection selection
               JPanel selectionPanel = new JPanel();
               // run initialiser methods
               JPanel buttonPanel = (JPanel) createButtons(buttonGroup, dialog);
               AbstractButton selection[] = createSelection(vector, buttonGroup,
                         selectionPanel);
               // scrollPane containing collection panel
               JScrollPane scrollPane = new JScrollPane(selectionPanel,
                         JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                         JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
               // panel containing scroll pane
               JPanel scrollPanel = new JPanel();
               scrollPanel.setLayout(new BoxLayout(scrollPanel, BoxLayout.X_AXIS));
               selectionPanel.setLayout(new GridLayout(vector.size(), 1));
               // assemble component structure
               scrollPanel.add(Box.createHorizontalGlue());
               scrollPanel.add(scrollPane);
               scrollPanel.add(Box.createHorizontalGlue());
               dialog.add(label);
               dialog.add(scrollPanel);
               dialog.add(buttonPanel);
               // set all components to be left-justified
               label.setAlignmentX(0.0F);
               scrollPanel.setAlignmentX(0.0F);
               selectionPanel.setAlignmentX(0.0F);
               buttonPanel.setAlignmentX(0.0F);
               // set higher-level component sizes
               Silk.setSizeAttributes(label, 300, 30, true);
               selectionPanel.setMaximumSize(new Dimension(250, 400));
               scrollPane.setMinimumSize(new Dimension(250, 50));
               scrollPane.setMaximumSize(new Dimension(250, 400));
               dialog.setMinimumSize(new Dimension(300, 200));
               dialog.setMaximumSize(new Dimension(300, 500));
               dialog.pack();
               // set components to be opaque
               label.setOpaque(true);
               scrollPane.setOpaque(true);
               selectionPanel.setOpaque(true);
               // display dialog frame
               //dialog.setResizable(false);
               dialog.setVisible(true);
          }The 'createButtons' method it uses is here:
     public JPanel createButtons(ButtonGroup bg, JDialog jd) {
               final ButtonGroup buttonGroup = bg;
               final JDialog dialog = jd;
               // confirmation buttons
               JButton okBtn = new JButton();
               JButton cancelBtn = new JButton();
               JButton newBtn = new JButton();
               // panel containing OK and CANCEL buttons
               JPanel bothPanel = new JPanel();
               // panel containing NEW COLLECTION button
               JPanel newPanel = new JPanel();
               // panel to contain all other button panels
               JPanel confPanel = new JPanel();
               confPanel.setLayout(new BoxLayout(confPanel, BoxLayout.X_AXIS));
               newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.X_AXIS));
               bothPanel.setLayout(new BoxLayout(bothPanel, BoxLayout.Y_AXIS));
               // definition of button Actions
               okBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
                         Actions.addScript(buttonGroup.getSelection()
                                   .getActionCommand(), null);
                         dialog.dispose();
               cancelBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
                         dialog.dispose();
               newBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
                         dialog.dispose();
                         new Actions.NewCollectionAction().actionPerformed(ae);
                         new Actions.NewScriptAction().actionPerformed(ae);
               // override action-set button text
               okBtn.setText("Ok");
               cancelBtn.setText("Cancel");
               newBtn.setText("Add New Collection");
               // set button sizes
               Silk.setSizeAttributes(okBtn, 115, 30, true);
               Silk.setSizeAttributes(cancelBtn, 115, 30, true);
               Silk.setSizeAttributes(newBtn, 250, 35, true);
               // set opaque buttons
               confPanel.setOpaque(true);
               okBtn.setOpaque(true);
               cancelBtn.setOpaque(true);
               // assemble components
               confPanel.add(Box.createHorizontalGlue());
               confPanel.add(okBtn);
               confPanel.add(Box.createRigidArea(new Dimension(20, 0)));
               confPanel.add(cancelBtn);
               confPanel.add(Box.createHorizontalGlue());
               newPanel.add(Box.createHorizontalGlue());
               newPanel.add(newBtn);
               newPanel.add(Box.createHorizontalGlue());
               bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
               bothPanel.add(confPanel);
               bothPanel.add(Box.createRigidArea(new Dimension(0, 5)));
               bothPanel.add(newPanel);
               bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
               bothPanel.setMaximumSize(new Dimension(300, 100));
               return bothPanel;
          }And the createSelection() method it uses is defined here:
     public AbstractButton[] createSelection(Vector<String> argVector,
                    ButtonGroup buttonGroup, JPanel selectionPanel) {
               Vector<String> vector = argVector;
               JRadioButton selection[] = new JRadioButton[vector.size()];
               for (int i = 0; i < vector.size(); i++)
                    selection[i] = new JRadioButton(vector.get(i));
               AbstractButton current;
               for (byte i = 0; i < selection.length; i++) {
                    current = selection;
                    // set action command string to later identify button that's
                    // selected
                    current.setActionCommand(vector.get(i));
                    // fix button's size
                    Silk.setSizeAttributes(current, 250, 30, true);
                    // set button's colour
                    current.setBackground(Color.WHITE);
                    // add button to buttongroup
                    buttonGroup.add(current);
                    // add button to appropriate JPanel
                    selectionPanel.add(current);
               // ensure one button is selected to prevent pressing OK with no
               // selection
               selection[0].setSelected(true);
               return selection;
Please help if you can.
Thank you.
- Dave

Yeah sorry camickr, I need to get into the habit of posting SSCCEs.
Here it is in SSCCE form:
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import java.util.Vector;
public class Testing {
     // prevent instantiation
     private Testing() {
     public interface SelectionDialog {
          // produces a component containing all dialog buttons
          public Component createButtons(ButtonGroup bg, JDialog jd);
          // produces an array of the selection buttons to be used
          public abstract AbstractButton[] createSelection(
                    Vector<String> selectionVector, ButtonGroup buttonGroup,
                    JPanel selectionPanel);
     abstract static class AbstractSelectionDialog implements SelectionDialog {
          public AbstractSelectionDialog() {
               Vector<String> vector = new Vector<String>();
               String title = "Broken dialog box";
               String message = "Why is the maximum size exceedable, hmm?";
               /* for sscce */
               vector.add("choice 1");
               vector.add("choice 2");
               vector.add("choice 3");
               vector.add("choice 4");
               vector.add("choice 5");
               vector.add("choice 6");
               vector.add("choice 7");
               vector.add("choice 8");
               vector.add("choice 9");
               vector.add("choice 10");
               vector.add("choice 11");
               vector.add("choice 12");
               vector.add("choice 13");
               vector.add("choice 14");
               vector.add("choice 15");
               vector.add("choice 16");
               vector.add("choice 17");
               vector.add("choice 18");
               // create new modal JDialog
               final JDialog dialog = new JDialog(Silk.getFrame(), title, true);
               // set boxlayout for dialog frame
               dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(),
                         BoxLayout.Y_AXIS));
               // set default close operation
               dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
               // create ButtonGroup to enforce exclusive collection choice
               final ButtonGroup buttonGroup = new ButtonGroup();
               // initialise other components
               // use fake space for label rather than use another HorizontalGlue
               JLabel label = new JLabel("   " + message);
               // panel containing collection selection
               JPanel selectionPanel = new JPanel();
               // run initialiser methods
               JPanel buttonPanel = (JPanel) createButtons(buttonGroup, dialog);
               AbstractButton selection[] = createSelection(vector, buttonGroup,
                         selectionPanel);
               // scrollPane containing collection panel
               JScrollPane scrollPane = new JScrollPane(selectionPanel,
                         JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                         JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
               // panel containing scroll pane
               JPanel scrollPanel = new JPanel();
               scrollPanel.setLayout(new BoxLayout(scrollPanel, BoxLayout.X_AXIS));
               selectionPanel.setLayout(new GridLayout(vector.size(), 1));
               // assemble component structure
               scrollPanel.add(Box.createHorizontalGlue());
               scrollPanel.add(scrollPane);
               scrollPanel.add(Box.createHorizontalGlue());
               dialog.add(label);
               dialog.add(scrollPanel);
               dialog.add(buttonPanel);
               // set all components to be left-justified
               label.setAlignmentX(0.0F);
               scrollPanel.setAlignmentX(0.0F);
               selectionPanel.setAlignmentX(0.0F);
               buttonPanel.setAlignmentX(0.0F);
               // set higher-level component sizes
               Silk.setSizeAttributes(label, 300, 30, true);
               selectionPanel.setMaximumSize(new Dimension(250, 400));
               scrollPane.setMinimumSize(new Dimension(250, 50));
               scrollPane.setMaximumSize(new Dimension(250, 400));
               dialog.setMinimumSize(new Dimension(300, 200));
               dialog.setMaximumSize(new Dimension(300, 500));
               dialog.pack();
               // set components to be opaque
               label.setOpaque(true);
               scrollPane.setOpaque(true);
               selectionPanel.setOpaque(true);
               // display dialog frame
               // dialog.setResizable(false);
               dialog.setVisible(true);
     protected static class ChooseCollectionDialog extends
               AbstractSelectionDialog implements SelectionDialog {
          public ChooseCollectionDialog() {
               super();
          public JPanel createButtons(ButtonGroup bg, JDialog jd) {
               final ButtonGroup buttonGroup = bg;
               final JDialog dialog = jd;
               // confirmation buttons
               JButton okBtn = new JButton();
               JButton cancelBtn = new JButton();
               JButton newBtn = new JButton();
               // panel containing OK and CANCEL buttons
               JPanel bothPanel = new JPanel();
               // panel containing NEW COLLECTION button
               JPanel newPanel = new JPanel();
               // panel to contain all other button panels
               JPanel confPanel = new JPanel();
               confPanel.setLayout(new BoxLayout(confPanel, BoxLayout.X_AXIS));
               newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.X_AXIS));
               bothPanel.setLayout(new BoxLayout(bothPanel, BoxLayout.Y_AXIS));
               // definition of button Actions
               okBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
                         dialog.dispose();
               cancelBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
                         dialog.dispose();
               newBtn.setAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent ae) {
               // override action-set button text
               okBtn.setText("Ok");
               cancelBtn.setText("Cancel");
               newBtn.setText("Add New Collection");
               // set button sizes
               Silk.setSizeAttributes(okBtn, 115, 30, true);
               Silk.setSizeAttributes(cancelBtn, 115, 30, true);
               Silk.setSizeAttributes(newBtn, 250, 30, true);
               // set opaque buttons
               confPanel.setOpaque(true);
               okBtn.setOpaque(true);
               cancelBtn.setOpaque(true);
               // assemble components
               confPanel.add(Box.createHorizontalGlue());
               confPanel.add(okBtn);
               confPanel.add(Box.createRigidArea(new Dimension(20, 0)));
               confPanel.add(cancelBtn);
               confPanel.add(Box.createHorizontalGlue());
               newPanel.add(Box.createHorizontalGlue());
               newPanel.add(newBtn);
               newPanel.add(Box.createHorizontalGlue());
               bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
               bothPanel.add(confPanel);
               bothPanel.add(Box.createRigidArea(new Dimension(0, 5)));
               bothPanel.add(newPanel);
               bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
               bothPanel.setMaximumSize(new Dimension(300, 100));
               return bothPanel;
          public AbstractButton[] createSelection(Vector<String> argVector,
                    ButtonGroup buttonGroup, JPanel selectionPanel) {
               Vector<String> vector = argVector;
               JRadioButton selection[] = new JRadioButton[vector.size()];
               for (int i = 0; i < vector.size(); i++)
                    selection[i] = new JRadioButton(vector.get(i));
               AbstractButton current;
               for (byte i = 0; i < selection.length; i++) {
                    current = selection;
                    // set action command string to later identify button that's
                    // selected
                    current.setActionCommand(vector.get(i));
                    // fix button's size
                    Silk.setSizeAttributes(current, 250, 30, true);
                    // set button's colour
                    current.setBackground(Color.WHITE);
                    // add button to buttongroup
                    buttonGroup.add(current);
                    // add button to appropriate JPanel
                    selectionPanel.add(current);
               // ensure one button is selected to prevent pressing OK with no
               // selection
               selection[0].setSelected(true);
               return selection;
     public static void main(String args[]) {
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    new ChooseCollectionDialog();
I considered that the GridLayout might be a problem, but surely the fact that it's ultimately contained in a BoxLayout (which [i]does respect maximum size) means the maximum size still shouldn't be exceedable?
Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Q10 Screen Sizing Problem in Blackberry 10.3

    Has anyone else noticed that there seems to be a screen sizing problem in Blackberry 10.3.
    When you wake the screeen with a gesture or pull the handset from the Q10 pocket, the screen that it "wakes" up to is enlarged, requiring the user to use the finger gestures to shrink it down to regular size.
    Or have I just not mastered 10.3 yet?
    Rgds
    E.T.
    Solved!
    Go to Solution.

    Hi Folks,
    I've sussed this one out!
    It is not a problem with the screen resolution or the software update, I had within the accessibility settings the "Magnify Mode" enabled.
    Disable this and the screen behaves perfectly..........
    False Alarm. Sorry!
    Revert to Defcon 5...........   :-)

  • Line Sizing Problem

    I am running several reports to produce PDFs that have an interesting behavior. When I publish a report out to our reports server, text in a text box is showing up at or near the top of the box that contains it. This report output does not look very good. On my desktop environment, when I run the report it produces a PDF with no sizing issues.
    I have read in several places that this might be a postscipt printer issue. So, I switched the printer on the report server machine to a postscript printer but it did not fix the problem. The font that I am using is Arial as that is the standard font that the client uses. The report server is 6. Any recommendations are appreciated.
    Thanks,
    Greg

    Greg,
    This is probably that server is not using the printer fonts for formatting and uses the system fonts.
    Please ensure you use the same printer / similar driver for both the desktop and server to see the effect.
    Also, the server if you run as service, by default it runs in the system login and the defaukt printer wouldn't be accessible. Please go to the services properties and ensure the login account has admin privilages to access the printer
    Thanks
    The Oracle Reports Team

  • JDialog setModal problems

    hi, i have a JDialog that needs to be modal,
    in the jdialog is a JList that gets filled up with a DefaultListModel after the dialog is instantiated, the problem now is when i have setModal ( true ), the JList doesn't fill up ?
    Anyone know a solution to this ?

    Does your code look something like this?
    JDialog dialog = new JDialog(parent);
    dialog.show();
    dialog.fillJList();
    If so, it won't work because the line dialog.fillJList() is not executed until the dialog is closed. Make sure you populate the JList in the constructor of the dialog.

  • JDialog Notification Problem

    I have a class that makes a JDialog popup notification display, letting you know that you have new email. I have set the popup to be always on top. The problem is, I can't figure out how to keep the popup dialogs from making the current window, for example FireFox, become deactivated. When the Firefox window becomes deactivated, you need to click inside the window for it used again.
    Is there anyway to make the popups always display on top of other windows but force them to display in a 'ghosted out' state until the user clicks on them?
    Thanks in advance,
    Garrett

    SettingsWindow settings = new SettingsWindow(new JFrame());You don't use "new JFrame()". A new frame is not visible anywhere. You use your current application frame.

  • Compressor 2 Quicktime to iPod Sizing Problem

    Hello,
    As a podcaster, I have to convert regular quicktime files into iPod-compatible m4v format all the time. Usually I use Quicktime Pro to do this - its simple and I havent had any problems with it. But I'm looking for ways to reduce my file sizes, so I was looking into using Compressor for this.
    I used the new H.264 iPod video setting, but got an unsatifactory result that mystifies me:
    720x480 quicktime file, when converted via Quicktime Pro's iPod conversion, becomes 320x213 and looks fine.
    The same file, when run through Compressor's iPod setting, goes to 320x240, BUT it looks stretched vertically.
    Any ideas why this might be happening?
    Thanks,
    Simon

    Actually, 320x240 is the correct aspect ratio for playback on a computer display. NTSC TV is a 4:3 aspect ratio so the correct viewing format for your 720x480 clip is actually 640x480 (note that the latter is a 4:3 ratio). This confusion results from the fact that NTSC TV displays use rectangular pixels while computer display pixels are usually square. Thus, in order to get the correct aspect ratio during playback on a computer's square pixels you need to set the video to 640x480 or 320x240. However, if you plan on viewing the output on a NTSC TV then either 720x480 or 320x213 are acceptable since both of those will result in a 4:3 viewing ratio during full screen playback on the TV (the conversion happens "auto-magically" -- in effect -- since a standard definition TV has a 4:3 aspect ratio).
    Note further that the iPod video display is 320x240 (also 4:3) so I'd suspect that the best quality playback on the iPod would be obtained with a similar sized movie.

  • JDialog focus problem

    I have an application which contains different panels and displays a message box which is a JDialog. To avoid recreate JDialog, I create one static dialog which is shared by all panels. I only set it visible at anytime needed. It works fine. The problem is I can't get focus on that dialog at the first time it shows up, I have to click some button on that dislog to gain focus even though I call button.requestFocus() right before it shows up. The problem only occurs at the first time it shows up. Who can solve this problem?

    It needs to have an owner to go ontop of, like Dilaog has...
    Frame parent = new Frame ();
    Dialog d = new Dialog (parent, blah blah);
    So now it knows it has to be in front of 'parent'. I assume it's the same for JDialog, I forget though. Check it out anywho.

  • JDialog setLocation problem

    Hi,
    I am stuck in very weird problem:
    I have an Jinternal frame that invokes a non-modal Jdialog box.
    I need to set the location of the dialog box from my code.
    The setLocation takes effect until I drag my window to a new location with my mouse.
    Any calls to setLocation after dragging fails. I see that the dialog box is temporarily drawn at the new position but it quickly moves back to its last known position.(I can see a sort of flicker...)
    I tried SetBounds, reshape also - same behaviour...
    I am so puzzled.
    Any help will be appreciated.

    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.

  • JDialog size problem

    Hi,
    I'd appreciate if someone could help me with this problem: I try create a custom dialog window. It pops up OK, but it defaults to the SMALLEST size possible. So i subsequently have to drag it bigger... Also, how do I suspend access to the primary gui while the dialog box is still unanswered?
    Code:-
    AutoGen ag = new AutoGen(); // my custom gui for dialog
    JDialog dialog = new JDialog();
    dialog.getContentPane().setLayout(new BorderLayout());
    dialog.setContentPane(ag);
    dialog.setVisible(true);

    dialog.getContentPane().setLayout(new BorderLayout()); // not required BorderLayout is the default
    dialog.setContentPane(ag);
    dialog.pack(); // sizes the dialog to the preferred size of your AutoGen panel
    dialog.setVisible(true);

  • How to fix a DataGrid headercolumn's headerText causing sizing problems

    Hello,
    I have a datagrid with filter textboxes underneath the header columns.
    My problem is that some of the headerText is rather large (in 2 of my columns), and causes it to wrap and stretch the header's height, which ultimately causes the columns to match up strangely and not in uniform.
    Here is a screenshot of the problem:
    http://img685.imageshack.us/img685/2283/gridcolumnsizeproblem.png
    How can I make all column headings uniform in size, with my filtering text boxes? I do not see a height property. I have tried to add extra spaces in the smaller column headings but that does nothing as I think FLEX parses that out. Can I specifically size these so they match the longer ones?
    Keep in mind, this DataGrid uses a custom renderer.
    Here is my grid definition/MXML:
                <dataGridFilters:FilterDatagrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{deviceDataColl}" click="dg_clickHandler(event)" >
                    <dataGridFilters:columns>
                        <dataGridFilters:DataGridFilterColumn dataField="name" headerText="Name" width="150"/>
                        <!--<dataGridFilters:DataGridFilterColumn dataField="deviceType" headerText="Device Type" textAlign="right"/>-->
                        <dataGridFilters:DataGridFilterColumn dataField="tHeat"   headerText="Heat Point" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tCool" headerText="Cool Point" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tIndoor" headerText="Indoor Temp" width="80" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tOutdoor" headerText="Outdoor Temp" width="90" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="insideHumidity" headerText="Indoor Humidity" width="100"  textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentFState" headerText="Fan State" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentFMode" headerText="Fan Mode"  width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentTState" headerText="State" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentTMode" headerText="Mode" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTDate" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Date" width="100" textAlign="right"/>
                        <!--<dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTime" headerText="Next Scheduled Control Point Transition Time" width="100" textAlign="right"/>-->
                        <dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTemp" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Temp" width="100" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="groupOne" headerText="Group 1" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="groupTwo" headerText="Group 2" width="75" textAlign="right"/>                   
                    </dataGridFilters:columns>
                </dataGridFilters:FilterDatagrid>
    Any help is greatly appreciated!
    Thank you,
    Devtron

    Rootsounds,
    Here is my headerRenderer class:
    package filters.header
        import mx.controls.dataGridClasses.DataGridHeader;
        import mx.core.mx_internal;
        use namespace mx_internal;
        public class DataGridFilterHeader extends DataGridHeader
            public function DataGridFilterHeader()
                super();
             *re-position the sort icon
            override protected function placeSortArrow():void
                super.placeSortArrow();
                if(sortArrow)
                    var hh:Number = cachedHeaderHeight;
                    sortArrow.y = (hh - sortArrow.measuredHeight - 8) > 0 ? 10: 0;
                    if(sortArrow.visible)
                        var n:int = headerItems.length;
                        for (var i:int = 0; i < n; i++)
                            if(visibleColumns[i].colNum == dataGrid.sortIndex)
                                headerItems[i].setActualSize(visibleColumns[i].width - sortArrow.measuredWidth + 5, headerItems[i].height);
    Here is my dataGrid extender:
    package filters
        import filters.header.DataGridFilterHeader;
        import flash.events.Event;
        import mx.collections.ICollectionView;
        import mx.controls.DataGrid;
        import mx.controls.dataGridClasses.DataGridColumn;
        import mx.core.mx_internal;
        use namespace mx_internal;
        public class FilterDatagrid extends DataGrid
            public function FilterDatagrid()
                super();
                headerClass = DataGridFilterHeader;
                addEventListener("filterEvent",onFilterChange);
            override public function set dataProvider(value:Object):void
                if(dataProvider)
                    resetFiltres();
                super.dataProvider = value;
                resetFiltres(filterFunction);
            private function  onFilterChange(event:Event):void
                if(dataProvider)
                    (dataProvider as ICollectionView).refresh();
                selectedIndex = 0;
            private function resetFiltres(inFilterFunction:Function = null):void
                if(dataProvider)
                    (dataProvider as ICollectionView).filterFunction = inFilterFunction;
                    (dataProvider as ICollectionView).refresh();
                if(inFilterFunction == null)
                    var iLen:int= columnCount;
                    for(var i:int=0;i<iLen;i++)
                        var dgc:DataGridColumn = columns[i] as DataGridColumn;
                        if(dgc is DataGridFilterColumn)
                            DataGridFilterColumn(dgc).filterText = "";
                selectedIndex = 0;
            private function filterFunction(inObject:Object):Boolean
                var iLen:int= columnCount;
                for(var i:int=0;i<iLen;i++)
                    var dgc:DataGridColumn = columns[i] as DataGridColumn;
                    var dField:String = dgc.dataField;
                    if(dgc is DataGridFilterColumn == false)
                        continue;
                    var srchStr:String =  DataGridFilterColumn(dgc).filterText;
                    if(srchStr == "")
                        continue;
                    var dataStr:String = dgc.itemToLabel(inObject);
                    var regex:RegExp = new RegExp("^"+srchStr, "i");
                    // if search string exists and
                    // does not match the data in the row
                    if(regex.exec(dataStr)==null)
                        return false;
                return true;
    If all this wrapper class stuff "Extends" the DataGrid, why wouldnt "headerHeight" be available as an attribute in my MXML/grid? When I try to set it explicitly in my dataGrid MXML, the compiler says "Cannot resolve attribute 'headerHeight'". I guess this doesnt really "extend" it? Im confused.

  • Acrobat Pro 9 TextBox Text Sizing problems

    I have recently installed Pro9 in my computer, previously I had Ver 6.
    Before Adobe Acrobat Pro 9, I could insert a TextBox in any PDF file and format the text right on the spot (i.e. size, color, style).
    Now with the new Pro 9, I can not edit the TextBox font. In order to change it I have to go another application and then do the changes there, then cut and paste into the PDF TextBox.
    Is anyone else having this problem or is just my application? do you have any suggestions?
    Thanks

    Hi ,
    This seems to be an issue specific to the file you are using . Does it happen for any file with tables ?
    If possible can you please share the file converting which you encountered such behavior . Please also mention your OS ,version of Acrobat and MSOffice version .
    Thanks,
    Apoorv

  • AS2 component sizing problem

    I experiencing a problem with the AS2 (V2) components named
    Datagrid and List. Is there a way to resize the using actionscript
    just to display more datas instead of scaling or stretching to the
    new size but still displaying the same amount of visible data.
    See? when change their size in action script, they scale or
    stretch, but I want to them to keep their aspect and offer to view
    more items at once.
    Any help will be appreciated

    Don't use _width or _height to change the size if that's what
    you're doing.
    myGrid.setSize(width, height);
    as an example if your Datagrid is called myGrid.

  • Sizing problem in JEditorPane

    I am tryying to set the size of JEditorPane using setSize(int w, int h) method, but it isn' working. The pane is rendered as just about a single character height even though I have given higher values (about 500) for height. Any idea what could be wrong?

    Hi,
    Refer these links:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7
    /people/boris.zarske/blog/2007/06/13/sizing-a-system-for-the-system-landscape-directory-of-sap-netweaver
    /people/william.li/blog/2008/03/07/step-by-step-guide-in-processing-high-volume-messages-using-pi-71s-message-packaging
    http://help.sap.com/saphelp_nwpi71/helpdata/en/46/79e8e13872275ae10000000a11466f/frameset.htm
    Regards,
    Nithiyanandam

  • IPhoto Printing - sizing problems

    After many hours of frustration I am about to give up on iPhoto 7.1 printing. The Print Settings dialog does not match the choices of settings or paper sizes of my printer. I enter a custom size [tedious to have to do when it is a standard photo paper size such as "L"], enter, then when I add a border the paper size reverts to A4. If I don't add a border or otherwise customize the picture, then go to "print" on checking the advanced print options the paper size does not match that set in the "Print Settings" dialog. Even if the preview looks right the print size does not match. I called into my local Apple store and tried this at the Genius Bar - they found the same issue on their Mac and after an hour of head scratching they could not figure it out. Any thoughts? This should be dead easy - I am back to adding borders in PS and printing from Aperture; not what I want to do for snapshots.

    Daniel:
    Welcome to the Apple Discussions. Can you provide a little more info regarding the paper sizes available, printer type, etc. Not familiar with paper size "\L\". What language is you Mac set up for? What sizes are you trying to print? Are you cropping the images to the paper size selected beforehand?
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Photoshop to illustrator sizing problem

    Hello All,
    This should be fairly simple, but I haven't had this problem before. I have a photo that I need to increase the size of the canvass and add a black vignette around,  then update this file in illustrator where it is placed. Every time I change the canvas size in photoshop and update in illustrator the photoshop image shrinks instead of getting bigger  (I have not changed the dpi or anything else except the canvas size). I've adjusted many images in photoshop and brought them into illustrator with no problem.  This is very strange....anyone have any ideas?
    Thanks!
    H

    You can scale an image to whatever size you want in Illustrator. If you take an 8x10 image and scale it down 50%, no matter what you do with the image in photoshop, the graphic element in illustrator will stay as a 4x5 dimension. It's not often one would want the parameters they have designed in one piece of software to be affected by what they do to the elements in another piece of software!
    Instead of simply updating the link to the image that is already placed in illustrator, you should place the image again (File-Place), and it will come in at 100% of it's (new) size,  same as any other image.

Maybe you are looking for

  • Master Data Atrribute of another Master Data

    Hello Gurus, I have the below scenario. Master Data with Text ZMDATA1 with Attributes ZMATTR1 and ZMATTR2. Master Data With Text ZMDATA2 with Attributes ZMDATA1 and ZMATTR3. when I load Master data to ZMDATA2, will it automatically update ZMDATA1 Mas

  • Black and white lines up and down screen

    When I start up my macbook pro white and black lines appear for the startup screen in bunches. After that the screen is black but the keyboard is lit up and you can still hear the sounds of turning up the volume and music can still play.

  • Async Client proxy -PI - File scenario- Pipeline steps missing in SXMB_MONI

    Hi I made a scenario where an ABAP client proxy(in a BW system) pulls data from a BW table and push it to PI. In PI a Mapping is done to write an XML file and sump it to a desired location. It is working fine in the development environment(request se

  • Zen xtra recording from line

    hi,I have been loading my new nomad Zen Xtra with my CD collection,going great once I got the hang of it {novice here} now I would like to load onto the `Zen` my old tape collection,this is where I am having a big problem,I make connection as follows

  • Issue using Page Service APIs

    Hi Based on instruction provided in the document below I have created a simple java class to pull back all pages created through the Page Service API. http://download.oracle.com/docs/cd/E14571_01/webcenter.1111/e10148/jpsdg_page_service.htm#BABFEDAH