Components' position and size

I've noticed that awt and swing components have methods which are supposed to resize and move them directly, without using LayoutManagers (methods like setX(), setY(), setLocation(), setSize(), reshape() etc).
But when I try to use them, the component always stays the same. Let's say I have a single component on a Frame, so it takes all the available space. I don't seem to be able to resize and then move it using the above methods.
Or do I miss something? Is there any way that I could lay my components out on a container just by using these methods, or do I need to do something for them to work?
Thanks in advance. =D

Hirsch wrote:
But why is that, that
Container.setLayout(null);
should never be used?I suppose that absolute statements should never be made. null layout has its place (in fact, some here such as navy coder use it exclusively), but many if not most of us prefer to use the layout managers for many reasons. They automate the placement of your components, they make it much easier to create resizeable applications, they make it safer to create GUIs that will be used in multiple environments where different screen sizes are possible.
For example, suppose you create a program that displays JRadioButtons like so:
import java.awt.GridLayout;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
public class FuPanel2
  private static void createAndShowUI()
    String radioLabels[] =
      "Fubar", "Snafu", "Bohica"
    // create a JPanel for jradiobuttons and have it use gridlayout
    JPanel radioPanel = new JPanel(new GridLayout(0, 1, 5, 5));
    ButtonGroup btnGrp = new ButtonGroup();
    for (int i = 0; i < radioLabels.length; i++)
      JRadioButton rBtn = new JRadioButton(radioLabels);
btnGrp.add(rBtn);
radioPanel.add(rBtn);
JFrame frame = new JFrame("FuPanel2");
frame.getContentPane().add(radioPanel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
public static void main(String[] args)
java.awt.EventQueue.invokeLater(new Runnable()
public void run()
createAndShowUI();
You'll notice that the JPanel that holds the JRadioButtons uses the GridLayout. If I want to add another JRadioButton, "Tarfu", all I have to do is add the String to the array and another radiobutton is produced and placed in the right location. I don't have to worry about setting sizes or positions of anything as it's all done for me:
    String radioLabels[] =
      "Fubar", "Snafu", "Bohica", "Tarfu" // have added "Tarfu"
    };Edited by: Encephalopathic on Aug 10, 2008 4:58 AM

Similar Messages

  • Adjust position and size of textField and button...

    Dear All,
    I have the following sample program which has a few textFields and a button, but the positions are not good. How do I make the textField to be at the right of label and not at the bottom of the label ? Also how to adjust the length of textField and button ? The following form design looks ugly. Please advise.
    import javax.swing.*; //This is the final package name.
    //import com.sun.java.swing.*; //Used by JDK 1.2 Beta 4 and all
    //Swing releases before Swing 1.1 Beta 3.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    import javax.swing.JTable;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    public class SwingApplication extends JFrame {
    private static String labelPrefix = "Number of button clicks: ";
    private int numClicks = 0;
    String textFieldStringVEHNO = "Vehicle No";
    String textFieldStringDATEOFLOSS = "Date of Loss";
    String textFieldStringIMAGETYPE = "Image Type";
    String textFieldStringIMAGEDESC = "Image Description";
    String textFieldStringCLAIMTYPE = "Claim Type";
    String textFieldStringSCANDATE = "Scan Date";
    String textFieldStringUSERID = "User ID";
    String ImageID;
    public Component createComponents() {
    //Create text field for vehicle no.
    final JTextField textFieldVEHNO = new JTextField(5);
    textFieldVEHNO.setActionCommand(textFieldStringVEHNO);
    //Create text field for date of loss.
    final JTextField textFieldDATEOFLOSS = new JTextField(10);
    textFieldDATEOFLOSS.setActionCommand(textFieldStringDATEOFLOSS);
    //Create text field for image type.
    final JTextField textFieldIMAGETYPE = new JTextField(10);
    textFieldIMAGETYPE.setActionCommand(textFieldStringIMAGETYPE);
    //Create text field for image description.
    final JTextField textFieldIMAGEDESC = new JTextField(10);
    textFieldIMAGEDESC.setActionCommand(textFieldStringIMAGEDESC);
    //Create text field for claim type.
    final JTextField textFieldCLAIMTYPE = new JTextField(10);
    textFieldCLAIMTYPE.setActionCommand(textFieldStringCLAIMTYPE);
    //Create text field for scan date.
    final JTextField textFieldSCANDATE = new JTextField(10);
    textFieldSCANDATE.setActionCommand(textFieldStringSCANDATE);
    //Create text field for user id.
    final JTextField textFieldUSERID = new JTextField(10);
    textFieldUSERID.setActionCommand(textFieldStringUSERID);
    //Create some labels for vehicle no.
    JLabel textFieldLabelVEHNO = new JLabel(textFieldStringVEHNO + ": ");
    textFieldLabelVEHNO.setLabelFor(textFieldVEHNO);
    //Create some labels for date of loss.
    JLabel textFieldLabelDATEOFLOSS = new JLabel(textFieldStringDATEOFLOSS + ": ");
    textFieldLabelDATEOFLOSS.setLabelFor(textFieldDATEOFLOSS);
    //Create some labels for image type.
    JLabel textFieldLabelIMAGETYPE = new JLabel(textFieldStringIMAGETYPE + ": ");
    textFieldLabelIMAGETYPE.setLabelFor(textFieldIMAGETYPE);
    //Create some labels for image description.
    JLabel textFieldLabelIMAGEDESC = new JLabel(textFieldStringIMAGEDESC + ": ");
    textFieldLabelIMAGEDESC.setLabelFor(textFieldIMAGEDESC);
    //Create some labels for claim type.
    JLabel textFieldLabelCLAIMTYPE = new JLabel(textFieldStringCLAIMTYPE + ": ");
    textFieldLabelCLAIMTYPE.setLabelFor(textFieldCLAIMTYPE);
    //Create some labels for scan date.
    JLabel textFieldLabelSCANDATE = new JLabel(textFieldStringSCANDATE + ": ");
    textFieldLabelSCANDATE.setLabelFor(textFieldSCANDATE);
    //Create some labels for user id.
    JLabel textFieldLabelUSERID = new JLabel(textFieldStringUSERID + ": ");
    textFieldLabelUSERID.setLabelFor(textFieldUSERID);
    Object[][] data = {
    {"Mary", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Chasing toddlers", new Integer(2), new Boolean(false)},
    {"Mark", "Andrews",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Angela", "Lih",
    "Teaching high school", new Integer(4), new Boolean(false)}
    String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    //Add the scroll pane to this window.
    getContentPane().add(scrollPane, BorderLayout.CENTER);
    final JLabel label = new JLabel(labelPrefix + "0 ");
    JButton buttonOK = new JButton("OK");
    buttonOK.setMnemonic(KeyEvent.VK_I);
    buttonOK.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
              try {
    numClicks++;
              ImageID = textFieldVEHNO.getText() + textFieldDATEOFLOSS.getText() + textFieldIMAGETYPE.getText();
    label.setText(labelPrefix + ImageID);
              ScanSaveMultipage doScan = new ScanSaveMultipage();
              doScan.start(ImageID);
         catch (Exception ev)
    label.setLabelFor(buttonOK);
    * An easy way to put space between a top-level container
    * and its contents is to put the contents in a JPanel
    * that has an "empty" border.
    JPanel pane = new JPanel();
    pane.setBorder(BorderFactory.createEmptyBorder(
    20, //top
    30, //left
    30, //bottom
    20) //right
    pane.setLayout(new GridLayout(0, 1));
         pane.add(textFieldLabelVEHNO);
         pane.add(textFieldVEHNO);
         pane.add(textFieldLabelDATEOFLOSS);
         pane.add(textFieldDATEOFLOSS);
         pane.add(textFieldLabelIMAGETYPE);
         pane.add(textFieldIMAGETYPE);
         pane.add(textFieldLabelIMAGEDESC);
         pane.add(textFieldIMAGEDESC);
         pane.add(textFieldLabelCLAIMTYPE);
         pane.add(textFieldCLAIMTYPE);
         pane.add(textFieldLabelDATEOFLOSS);
         pane.add(textFieldDATEOFLOSS);
         pane.add(textFieldLabelUSERID);
         pane.add(textFieldUSERID);
    pane.add(buttonOK);
         pane.add(table);
    //pane.add(label);
    return pane;
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(
    UIManager.getCrossPlatformLookAndFeelClassName());
    } catch (Exception e) { }
    //Create the top-level container and add contents to it.
    JFrame frame = new JFrame("SwingApplication");
    SwingApplication app = new SwingApplication();
    Component contents = app.createComponents();
    frame.getContentPane().add(contents, BorderLayout.CENTER);
    //Finish setting up the frame, and show it.
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);

    Post Author: Ranjit
    CA Forum: Crystal Reports
    Sorry but, i've never seen formula editor for altering position and size. If you know one please navigate me.
    I guess you have updated formula editor beside "Lock size and position" - if yes its not right. There is only one editor beside 4 items and editor is actually for Suppress.
    Anyways, A trick to change size a position is:
    Create 4-5 copies (as many as you expect positions) of the text object. place each at different positions,  right click, Format, Suppress and in formula editor for suppress write the formula: If your condition is true, Suppress=false, else true.
    Position will not change but user will feel; for different conditions -position is changed
    Hope this helps.
    Ranjit

  • How can i lock the position and size of all of my .app windows?

    I have had this problem for a few months now; I would size the window of one of my apps (lets use safari for example) exactly the size i want it, then i position it exactly in the center of my screen because I'm OCD like that, then I'm just browsing the internet and i accidentally move the window so then i have to move it back. Sometimes it gets even worse and for whatever reason, my cursor is down in the lower right part of my window and i accidentally size it, then i have to go back and resize it to where it was. Please help me! there has to be a way to lock my windows positions and sizes! is there a widget or a program out there that can save my life?! Thanks haha

    AFAIK, there isn't. All I can suggest is that you quit clicking and dragging the cursor. Use the arrow keys to scroll up and down. I don't have a laptop, but there might be a trackpad setting for the various swipe stuff that comes with them.

  • How can i change the position and size of the applet

    dear fellows,
    how can i change the position and size of the applet in which form is running over the web.
    thanx
    Mochoo

    Yes, you can add the following line to your formsweb.cfg section :
    HTMLbodyAttrs=onLoad='javascript:self.moveTo(100,100)'
    if you are in SEPERATEFRAME = FALSE
    Or Set_Window_Property( FORMS_MDI_WINDOW, POSITION, X, Y ) ;
    if you are in SEPERATEFRAME = TRUE

  • Panel position and size

    Is there a way to set a panel's x/y position and size using PS scripting?  If someone could point me to some documentation on this, that would be hugely appreciated!

    I don't think you can set the position of a custom panel. It seems to open where ever it was last closed. But you can set the size.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()"
         paddingLeft="0" paddingBottom="0" paddingRight="0" paddingTop="0"
         verticalScrollPolicy="off" horizontalScrollPolicy="off"
         horizontalGap="0" verticalGap="1">
         <mx:Script>
              <![CDATA[
                   import com.adobe.csxs.core.CSXSInterface;
                   import com.adobe.csxs.events.*;
                   import com.adobe.csxs.types.*;
                   private function getGeometry():WindowGeometry {
                        var panel_X:Number = 100;
                        var panel_Y:Number = 100;
                        var panel_W:Number = windowsizebox.width + 15;
                        var panel_H:Number = windowsizebox.height + 20;
                        var windowsize:WindowGeometry = new WindowGeometry(panel_X,panel_Y,panel_W,panel_H);
                        return windowsize;
                   private function setSize():void{
                        var csxs:CSXSInterface = CSXSInterface.getInstance(); 
                        csxs.requestStateChange(StateChangeEvent.WINDOW_RESIZE, getGeometry());
                        Function:          init
                        Description:     Initialize the panel
                   public function init():void{
                        try{// for skinning
                             var result:SyncRequestResult = CSXSInterface.instance.getHostEnvironment();
                             var hostData:HostEnvironment = result.data;
                             var skinInfo:AppSkinInfo = hostData.appSkinInfo;
                             var defaultColor:String = skinInfo.panelBackgroundColor.color.rgb;
                             this.setStyle("backgroundGradientColors", [defaultColor, defaultColor]);
                             this.setStyle("fontFamily", skinInfo.baseFontFamily);
                             this.setStyle("fontSize", skinInfo.baseFontSize);          
                        }catch (errObject:Error) {}
              ]]>
         </mx:Script>
         <mx:VBox x="10" y="10" id="windowsizebox"  height="100" width="100">
              <mx:Button label="Button" click="setSize();"/>
         </mx:VBox>
    </mx:Application>

  • Flah Player Screen Position and Size Restrictions

    Hi All,
    I'm creating an interactive program which is to be used on
    Windows desktops through flash player rather than as a projector or
    html page. My problem is screen positioning and
    resize-restrictions.
    I want to be able to restrict the user from resizing the
    flash player; the stage size is currently set to 800x600 and I want
    to keep it that way on the desktop as I'm using photographs which
    when the player is resized is leaving blank bars down the sides
    (due to the photographs being 800x600).
    I'd also like to be able to position the flash player in the
    top-left hand corner of the screen.
    I'm not great at flash and have tried numerous things but
    can't get these to work, can anybody help?
    Regards,

    Hi
    This is possible, if you make your Flash file into a
    Projector file and
    bring it into Jugglor
    http://www.jugglor.com
    Download a FREE evaluation copy and look at
    Jugglor -> Setting Settings -> Windows Settings
    Here you have the restrictions as you require.
    Hope this helps.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. -
    http://www.flashjester.com
    There is a very fine line between "hobby" and
    "mental illness."

  • How do you control the position and size of images, i.e,. photo to the printer?

    HP Officejet 8600
    Windows XP
    I am trying to figure out how to control the positon and size of photos or pics that are included in an email that I send to my printer via HP ePrint.
    This question was solved.
    View Solution.

    Hey Old_Salt,
    What model HP printer do you have?
    ePrint is a very simple system when it comes to printing, because it doesn't provide as many controls as one may be used to with a computer.  Many of the photosmart printers are designed to recognize a photo in ePrint and print the image to the proper photo paper.
    Jason
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • Detecting change of position and size of child components

    As a JavafX learning excercise I want to create a scrollable container (Scrollbox). This may not seem a difficult thing to do but I want to simulate the CSS "overflow: auto" behaviour so the scrollbars only appear when the content overflows the container.
    With the following code I can detect when the content changes and determine if scrollbars are needed, but if any of the child components are moved or resized I need to call checkOverflow again and I can't figure out the binding to do this.
    override var content on replace {
    checkOverflow();
    I may have the approach completely wrong so any help is much appreciated.
    Thanks.
    coolbeans

    This is what I have ended up with. The container will dynamically add vertical and horizontal scrollbars if any nodes in the content overflow the scrollbox container. I have also added an option to allow the scrollbox area to be scrolled by dragging the content area but if you don't like this you can turn it off. The source code is below and as this is my first look at Javafx I will be interested in any feedback.
    * ScrollBox.fx
    * Copyright 2009 Coolbeans
    package coolbeans;
    import javafx.scene.CustomNode;
    import javafx.scene.Node;
    import javafx.scene.Group;
    import javafx.scene.layout.Panel;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.control.ScrollBar;
    import javafx.scene.input.MouseEvent;
    public class ScrollBox extends CustomNode {
    //Public Properties
    public var width: Number = 300 on replace { checkControls(); };
    public var height: Number = 300 on replace { checkControls();}
    public var content:Node[];
    public var borderColor:Color = Color.LIGHTGRAY;
    public var fill:Color = Color.WHITE;
    public var allowDragScroll:Boolean = true;
    //Private Stuff
    var view: Panel;
    var saveVscrollVal: Float;
    var saveHscrollVal: Float;
    var hscroll:ScrollBar = ScrollBar {
    vertical: false;
    visible: false;
    min: 0;
    var vscroll:ScrollBar = ScrollBar {
    vertical: true;
    visible: false;
    min: 0;
    override public function create() : Node {
    Group {
    content: [
    Rectangle {
    fill: bind fill
    width: bind width - 1
    height: bind height - 1
    stroke: bind borderColor
    hscroll, vscroll,
    Group {
    content: [
    view = Panel {
    content: bind content;
    onLayout: function() : Void {
    checkControls();
    layoutX: bind -hscroll.value
    layoutY: bind -vscroll.value
    clip: Rectangle {
    width: bind if (vscroll.visible) then
    width - vscroll.width
    else width;
    height: bind if (hscroll.visible) then
    height - hscroll.height
    else height;
    onMousePressed: function( e: MouseEvent ):Void {
    saveVscrollVal = vscroll.value;
    saveHscrollVal = hscroll.value;
    onMouseDragged: function( e: MouseEvent ):Void {
    handleMouseDrag(e.dragX, e.dragY);
    clip: Rectangle { width: bind width, height: bind height}
    function checkControls() : Void {
    var maxX:Float = 0;
    var maxY:Float = 0;
    //Calculate the maximum size of the viewport
    for (c in content) {
    var b = c.boundsInLocal;
    if (b.maxX > maxX) maxX = b.maxX;
    if (b.maxY > maxY) maxY = b.maxY;
    if (maxX > width) {
    hscroll.width = width;
    hscroll.layoutY = height - hscroll.height - 1;
    hscroll.max = maxX - width;
    hscroll.visible = true;
    } else {
    hscroll.value = 0;
    hscroll.visible = false;
    if (maxY > height) {
    vscroll.height = height;
    vscroll.layoutX = width - vscroll.width - 1;
    vscroll.max = maxY - height;
    vscroll.visible = true;
    } else {
    vscroll.value = 0;
    vscroll.visible = false;
    //Make sure the scrollbars don't overlap in the bottom right corner
    if (hscroll.visible and vscroll.visible) {
    hscroll.width -= vscroll.width;
    vscroll.height -= hscroll.height;
    view.width = maxX;
    view.height = maxY;
    function handleMouseDrag(dragX:Float, dragY:Float) : Void {
    if (allowDragScroll = false) return;
    if (vscroll.visible) {
    var newpos = saveVscrollVal + -dragY;
    if (newpos < vscroll.min)
    newpos = vscroll.min
    else if (newpos > vscroll.max)
    newpos = vscroll.max;
    vscroll.value = newpos;
    if (hscroll.visible) {
    var newpos = saveHscrollVal + -dragX;
    if (newpos < hscroll.min)
    newpos = hscroll.min
    else if (newpos > hscroll.max)
    newpos = hscroll.max;
    hscroll.value = newpos;
    }

  • Give absolute position and size to components

    When I do something like
    getContentPane().add(new Panel()); then the panel is spread all over the frame. How can I say something like "put the panel at position (10, 10) and its size should be (200, 100) no matter what size my frame is"?

    here ya go ...
    //create and add a JPanel ...
    JPanel panel = new JPanel();
    getContentPane().add(panel);
    //you can do it this way: (all in one)
    panel.setBounds(X-Position,Y-Position,Width,Height);
    //or this way: (seperate)
    panel.setLocation(X-Position,Y-Position);
    panel.setSize(Width,Height);

  • I need to control the position and size of each java swing component, help!

    I setup a GUI which include 2 panels, each includes some components, I want to setup the size and position of these components, I use setBonus or setSize, but doesn't work at all. please help me to fix it. thanks
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.FlowLayout;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.event.*;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.JPanel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.DefaultListModel;
    public class weather extends JFrame {
    private String[] entries={"1","22","333","4444"} ;
    private JTextField country;
    private JList jl;
    private JTextField latitude;
    private JTextField currentTime;
    private JTextField wind;
    private JTextField visibilityField;
    private JTextField skycondition;
    private JTextField dewpoint;
    private JTextField relativehumidity;
    private JTextField presure;
    private JButton search;
    private DefaultListModel listModel;
    private JPanel p1,p2;
    public weather() {
         setUpUIComponent();
    setTitle("Weather Report ");
    setSize(600, 400);
    setResizable(false);
    setVisible(true);
    private void setUpUIComponent(){
         p1 = new JPanel();
    p2 = new JPanel();
         country=new JTextField(10);
         latitude=new JTextField(12);
    currentTime=new JTextField(12);
    wind=new JTextField(12);
    visibilityField=new JTextField(12);
    skycondition=new JTextField(12);
    dewpoint=new JTextField(12);
    relativehumidity=new JTextField(12);
    presure=new JTextField(12);
    search=new JButton("SEARCH");
    listModel = new DefaultListModel();
    jl = new JList(listModel);
    // jl=new JList(entries);
    JScrollPane jsp=new JScrollPane(jl);
    jl.setVisibleRowCount(8);
    jsp.setBounds(120,120,80,80);
    p1.add(country);
    p1.add(search);
    p1.add(jsp);
    p2.add(new JLabel("latitude"));
    p2.add(latitude);
    p2.add(new JLabel("time"));
    p2.add(currentTime);
    p2.add(new JLabel("wind"));
    p2.add(wind);
    p2.add(new JLabel("visibility"));
    p2.add(visibilityField);
    p2.add(new JLabel("skycondition"));
    p2.add(skycondition);
    p2.add(new JLabel("dewpoint"));
    p2.add(dewpoint);
    p2.add(new JLabel("relativehumidity"));
    p2.add(relativehumidity);
    p2.add(new JLabel("presure"));
    p2.add(presure);
    this.getContentPane().setLayout(new FlowLayout());
    this.setLayout(new GridLayout(1,2));
    p2.setLayout(new GridLayout(8, 2));
    this.add(p1);
    this.add(p2);
    public static void main(String[] args) {
    JFrame frame = new weather();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    [http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]
    db

  • Define Control Position and Size Numerically (in a new Properties page)

    It would be quite helpful to have a Property page for Front Panel Controls and Indicators where you can define the size (height, width) and position (top, left, related to its container, which can be a panel, a sub-panel, a Tab control, a cluster,...).

    Duplicate: Add Position to the Properties Dialog

  • Where does SAP save form position and sizes?

    On my custom forms created with the SDK the SAP client saves the column sizes of matrix fields (CPRF) using the standard functionality but the form size and position is not saved.
    Does anyone know where SAP stores the form size and position for standard forms? I'd like to try to get this to work for my custom forms as well.
    Thanks!

    Hi William,
    I looked at this before and my conclusion was that the UserPrefs column of the OUSR table holds this information. When the user closes SBO, changes to the window sizes and locations are written back to this field. I checked this by doing the following (on a test database):
    1) Stored the current value of the UserPrefs field for the user in a temporary location.
    2) Logged on as the user and made changes to the size and location of certain windows.
    3) Logged out and then back in again to make sure that the new locations were saved. All windows that I'd changed still held their new sizes and locations.
    4) Logged back out and then ran an update statement to revert just the UserPrefs field back to its previous value.
    5) Logged back in and the screens had reverted back to their original sizes and locations.
    The problem is that this field has an image data type so it's impossible to decipher (and, even if you could, you can't directly alter the data in this field).
    Regards,
    Owen

  • Strange position and size when QT opens

    I'm a Windows user. My Canon Ixus 220 HS digicam has a neat 1920x1080 movie capability. It creates files in MOV format.
    But when I play these on my Windows XP PC, QT always opens offset down and right (100,100) and at a size of 1936 x 1205, which is greater than my 1920x1200 screen!
    Here's an example:
    http://dl.dropbox.com/u/4019461/QT-Puzzle-1.jpg
    So I can't see the controls until I use View > Half Screen.
    This is becoming a real PITA, so I hope one of the experts can suggest a fix please.
    In case it helps, here's what MediaInfo reports for a typical MOV file:
    http://dl.dropbox.com/u/4019461/QT-Problem.jpg
    Terry, East Grinstead, UK

    It seems this is a long-standing problem that Apple have not not bothered to fix.
    http://www.velocityreviews.com/forums/t719594-quicktime-player-opens-too-large-o f-a-screen.html
    Terry, East Grinstead, UK

  • [Desktop] Remember the size, position and monitor last used when Spotify was closed

    I always use Spotify on my smaller secondary monitor, but every time it loads it appears on my primary monitor and is the "default" size, so I need to move it to the other monitor and resize the window on a daily basis. Could Spotify remember the last know position and size it was set to, and automatically load using these settings next time it's opened? Thanks,James

    Updated: 2015-07-05

  • Location and size of hotspot in a packaged file

    Hi all,
    I'm working on a authorware program in which I want to use the location ans size of a clicked hotspot to draw a rectangle. Ultimately, I would like to be able to change the size/position of a hotspot, and when packaged, the rectangle should be drawn at the new position of the hotspot, with the new size. So far, I've been succesful in an unpackaged file with:
      GetIconProperty(@Title; #awSizeX))
      GetIconProperty(@Title; #awSizeY))
      GetIconProperty(@Title; #awLocationX)
      GetIconProperty(@Title; #awLocationY)
    where Title is the title of the clicked hotspot. So far so good... BUT I learned the hard way that GetIconProperty() does not work in a packaged authorware file (next time I'll first read the help section better!). My question: how can I obtain the same information in a packaged authorware file?
    I have been looking at the GetSpriteProperty() function, which should work in a packaged file. However, the hotspots are not sprites, and I don't know what spriteproperties I should use for the location and size of the hotspot  (#awSizeX, #awSizeY, #awLocationY, & #awLocationX don't work). Furthermore, GetPostPoint does provide the position of the top left pixel position of the hotspot, but I need separate X and Y values for the position of the hotpot to be able to use the Box() function to draw the rectangle. And I need the of the hotspot as well. Lastly, PositionY@Title and PositionX@Title don't work for my hotspots (the value is always 0 and does not change when clicking the hotspots).
    I could solve the problem by making variables of all the position values and size values of all the hotspots, but then I would not be able to change the position and size of the hotspot by dragging, and changing the rectangle accordingly.
    I would be more than happy to hear if anyone has a solution for me.
    Thanks!

    Hi Steve,
    Thanks for your suggestions! Regarding your first thought: I don't know what you mean by making my clickable area a hit *object. I've tried the help pages of authorware, but it drew a blank. Could you explain how I can make my clickable area a hit *object?
    Regarding clickX/Y: the values depend on the exact location where the user clicks, therefore drawing a rectangle over a picture (which is not moving) is difficult using clickX/Y. I would like the rectangle to appear on a certain spot (namely on the position of the hotspot, with the same width & height), regardless where in the hotspot the user clicks.
    Frank

Maybe you are looking for