Positioning of objects

i have a JDialog and want to position the components so that they pass exactly . for example i have a JLabel but only part of it seen ,
should i give the size of any component maually
the other problem is that the user should be able to enter data in JTextfield but only figures , how can i forbid entering of figures
thanks in advance

Do you know how can i set the size of the objects
.setSize(new Dimension(x, y))and look at
.setMinimumSize()
.setMaximumSize()
how can i set the JDialog unresizable ?Look at http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Dialog.html#setResizable(boolean)

Similar Messages

  • Exact, precise positioning of Objects

    I have an application that needs to be very precise in the positioning of a text object (so that OCR can read it).  As an example, I can position an object at x=3.5 inches but I need to position at x=3.53.   I use the "Size and Position" dialog box and enter x=3.53.  Get out of the dialog, go back in and it has changed to 3.52, Get out and in and now it is 3.51.  Once at 3.5 it stays at 3.5.  Position seems to work well at 1/10 of an inch but I need 1/100 of an inch.  Snap to Grid & Free-Form Placement Options can be on or off - no difference.
    This is my first post.

    James Terry You sent a reply via email with discussion regarding setting the grid to 0.01 inches (which is 1/100 of an inch).  When I sent grid to 0.01" and moved them manually without using "Size and Position" dialog window, the objects stayed where they needed.  Going in and out "Size & Position" does cause it to move.  But by forcing 0.01" with snap turned on, I GOT WHAT I NEEDED!  James: put in a response and then I can award points and mark this answered.

  • Dynamic Positioning of Objects in a Grid (rows and columns) AS3 Tutorial

    The topic of a dynamic positioning of objects in a right grid (rows and columns) comes up often so I decided to post an AS3 solution here:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/

    Hard to tell from your description but this might help:
    http://dtptools.com/product.asp?id=atid
    Bob

  • Dynamic Positioning of Objects in a Grid (rows and columns) with AS3 Tutorial

    The topic of a dynamic positioning of objects in a right grid (rows and columns) comes up often so I decided to post an AS3 solution here:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/

    Hard to tell from your description but this might help:
    http://dtptools.com/product.asp?id=atid
    Bob

  • Fine positioning of objects in Keynote

    Does anyone have any tips to help me create Keynotes on the iPad - specifically to do with aligning and positioning objects?
    Examples:
    I imported a Keynote from my Mac and noticed later that the new font had moved a few objects. I needed to shift a column of icons, and a column of text labels slightly to make more room, and then try to line the columns up again. The guides were great for aligning the centres of all the icons, but I needed to align the LEFT edges of the text labels. I couldn't figure that out and found it annoying that the text tended to jump to a centre alignment. Is there any way of left, right, top, bottom or centre aligning multiple objects after selecting them? If not can I suggest that Apple add this to the object properties, perhaps on the Arrange page?
    Similarly, I needed to replace a logo on a group of 4 slides with a smaller version. I copied the new logo to the first slide, and then tried to copy it onto the other slides. However it copied exactly where I had tapped the screen, and I could see no way of making it copy to the exact same location on each slide. I then tried to move the logo manually to the same place, but found that I can't let go of the screen without the logo jumping a pixel or two. I found that after moving the logo, if I could touch it with a second finger, and THEN lift the first finger, it seemed to stay in place. Sadly some of the objects are too small to do that though.
    Touching multiple fingers on the screen seems to give extra positioning options like a vertical constraint, a move by 10 pixels option and so on. Has anyone found a complete list of these anywhere?

    LEFT edges of the text labels
    For this one, you can turn on "edge guides" in the wrenches settings menu.
    I copied the new logo to the first slide, and then tried to copy it onto the other slides. However it copied exactly where I had tapped the screen, and I could see no way of making it copy to the exact same location on each slide.
    did you reselect from teh first slide, copy. then go and paste into the additional slides. When I do this, I get it in the same position each time, no matter where I tap.
    Has anyone found a complete list of these anywhere
    I beleive these are all listed in the help menu option under the Wrench icon. I just looked and it is under the "Rotate, flip, nudge and match object sizes"  heading. You will also find the answers to some of your other questions in there.
    ...can I suggest that Apple...
    Please go to Http://www.apple.com/feedback and select the appropriate product to make bug reports, product suggestions, etc...
    Hope this all helps out some,
    Jason
    p.s. you might get better and faster reponses to your postings if you break out your exact questions into bullets or summarize your questions explicitly. I passed yours over last night due to the length of the post, honestly. Only had a few minutes and told the wife I will look today to see if anyone answered you yet.

  • How to fix acrobat 9.4.1 NOT to change position of objects after editing in Illustrator?

    Everyday I use the editing capabilities of Acrobat, with the ''Touchup Object Tool''. With objects, it opens in Illustrator, it's fantastic what you can do. A few days ago, I let Apple upgrade my OS from 10.6.4 to 10.6.5 (in fact, it is the second workstation at my work place, that's having the same problem). The problem is the following... When editing an object with that tool, saving back into the PDF file forces the position of that object to change, it shifts about half of an inch to the right and above. I don't see how I can fix this. Anybody has a solution?

    no bug - most likely it is user error but only you know what has gone on
    In anycase there have been virtually no reports of this - it is extremely unlikely to be a bug - and virtually zero chance that Apple will be fixing your problem
    LN

  • Can I dynamically control the position of objects on a printed page?

    Forum:
    Oracle Developer Reports Builder (10g)
    I have a need to control the position of printing on a peel off label in my report. I currently am forced to represent a complex object three times , i.e. LEFT, RIGHT and CENTER, printing whichever is configured in the PRINTER_INFO table of my schema. I am printing to over 200 printers and they all print the location differently.
    Also, since printing through the DESTYPE=PRINTER ,vs printing from a displayed PDF have different results, I would have to refresent these three objects yet again, sligh lower and to the right to support label printing from a PDF.
    I have seen where Word Macro can dynamically position this same object by using xy coordinates.
    Does anyone know how to do something like this in Oracle Reports.
    Thx in advance,
    Gary
    [email protected]

    Dora,
    Yes, that is exactly what I am doing. As I mentioned, the label object has many elements and they all sit on top of each other when doing the layout. This by itself is messy to work with.
    This has been workable so far with regard to generating output to the several hundred printers of different models and firmware.
    The output is rarely if ever centered in both x & y axis. We have only been able to use in production by relaxing the rules so that the text only need be within the boundaries of the label.
    I also found that to support printing from the PDF view that the text positioning is well out of the label boundaries. I would be forced to create an additional three complex objects in the 'Y' axis. Needless to say this is quite messy.
    I do appreciate your input, but your recommendation does not meet the requirements of my project.
    I don't believe that Oracle Reports can do this task. I am thinking that BI Publisher can, and am doing "due diligence" before recommending a new reporting platform.
    Thx again.
    Gary

  • Positioning moving objects

    I'm getting ready to make a 2d game and wasn't sure how to draw moving objects on the screen. I've played around in the past and always had a fixed sized window and basically moved objects around on a pixel grid. I want to have a resizeable window but keep the relative size and movements of objects the same. How is this usually done? Should I just render it to the largest possible window size and then transform it to the appropriate size? Thanks in advance!

    jgould wrote:
    I'm getting ready to make a 2d game and wasn't sure how to draw moving objects on the screen. I've played around in the past and always had a fixed sized window and basically moved objects around on a pixel grid. I want to have a resizeable window but keep the relative size and movements of objects the same. How is this usually done? Should I just render it to the largest possible window size and then transform it to the appropriate size? Thanks in advance!Not sure what that means. Basically you have a couple options:
    1- Store locations by ratios, not exact coordinates. So if you want a GameObject's location to be in the direct middle of the screen, its position would be (.5, .5). Then when you go to draw that GameObject, you have to convert that position to screen coordinates. You do this simply by multiplying the ratio-coordinates by the game window's width or height.
    2- Store locations by some model coordinates. This is similar to the first method, but requires some extra translation. You would store the GameObject's location via coordinates such as (50, 50), but you would also have to keep track of how large your game window model was (for simplicity's sake, let's say it is 200 by 100):
    drawPoint( (gameObject.getX() / 200) * gamePanel.getWidth(), (gameObject.getY() / 100) * gamePanel.getHeight() );Does that make any more sense?
    Edit- I should say that there probably are a ton of other ways to do it, these are just the ways that most easily fit into my head. It's all just algebra though.
    Edited by: kevinaworkman on Nov 13, 2009 2:54 PM

  • Positioning my objects

    how do you set the positioning of an object in java
    public class Panel extends JPanel{
    public void mymethod (int i){
    Graphics paper = this.getGraphics();
    paper.setColor(Color.black);
    Graphics hit = this.getGraphics();
    hit.setColor(Color.yellow);
    switch(i){
    case1:
    case2:
    public class Display extends JFrame{
    public static void main (String []args){
    Panel background = new Panel();
    Panel panel1 = new Panel(); ///////////////****************************
    Panel panel2 = new Panel(); ////////////////***********************************
    background.setPreferredSize(new Dimension(500, 200));
    MainWindow window = new MainWindow();
                    window.getContentPane().add(background);
    window.pack(); // Makes window display at proper size.
                    window.setVisible(true);
    }// main
    }I WANT TO ADD mypanel1 and mypanel2 to the background of Display which i have defined. But when i add it i want it to access the switch statment i.e panel1.mymethod(1); and panel2.mymehtod(2); and add this then put panel2 to the right 100 pixel of panel1
    I want to make instances of MyClass
    MyClass myclass1=new MyClass();
    MyClass myclass2=new MyClass();i then want to access the switch statment
    myclass1.mymehtod(1);
    myclass2.mymehtod(2);and i want to display these instances on a JPanel in another class which myclass1 should be on the left and myclass2 on the right 100 pixels away from the other.
    Please show any code

    surprise wrote:
    how do you set the positioning of an object in javaBefore you worry about this, you had better go through the Sun Swing tutorials. You are making a critical error trying to mix AWT components (i.e., Panels) with Swing components. Unless you really know what you are doing (and in this situation, you don't), this shouldn't be done.
    and i want to display these instances on a JPanel in another class which myclass1 should be on the left and myclass2 on the right 100 pixels away from the other.You should read up on the Layout managers. BoxLayout may work well here, though again, first go through the basic Swing tutorials.
    Please show any code???
    aw h�ll, you've already been told much of this in your cross-post. You've also got another cross-post in the Java-2D forum. Unless you are trying to piss us off, you'd best refrain from cross-posting.
    Edited by: Encephalopathic on Feb 18, 2008 9:53 AM

  • Wrong position of objects / difference between editor view and browser view.

    Dear Adobe
    System info: Mac OS X 10.9, Muse 7.1 Build 329, Chrome, Safari and Firefox in the newest versions.
    I use Muse since version 5 and this effect does exist 'til today (v7.1) without any changes.
    Many times i have differences in the position of placed objects. But this missbehaviour is not realy logical. For example take a look to this illustration:
    Left: Muse Editor, right: Browser (in this case its chrome, but the effect is identical in safari and firefox too)
    Left you see one pixel space between the blue bar and the shadow (image-object). In the browser is the space bigger (2px). When i move the shadow-object in muse one pixel higher, then look this so:
    The shadow is now within the bluebar. The position has changed in muse for 1 pixel, in browser around 7 pixels... i don't see, why.
    Another example:
    Left Muse Editor, right Browser... do you see the dramatic difference between?
    I hope, this problem can be solved with a future version...
    Best regards
    Michael

    This variation is due to the difference in the layout of text between Design view and Preview, which is representative of the variations that exist between browsers, OSes, devices and individual versions of each of those.
    It's impossible to reverse engineer the structure of the objects from the screenshots, but how the objects or individual sized and positioned relative to one another is key to understanding (and explaining) what you're encountering.
    If you provide the URL for this page I'll attempt take a look at it and provide some guidance for how to achieve the effect you're looking for within the constraints inherent in working with live text on the web.
    (In case you're not already aware, you can Publish to a free trial site on Adobe Business Catalyst at any time using the Publish button. Using trial sites on BC is very convenient, even if you don't plan to host the finished site on BC.)

  • Send the position of objects to external script.

    Hello
    Can someone point me in the right direction with my problem.
    I have a flash script which creates instances of movie clips and stores them in an array. What I want the script to perform next, is when clicking a "save" button the position and the movieclip class name of each created instance will be sent to an external script to store.
    Thanks in advance
    Will

    You can pass send variables into url and the page on server can process it.
    Use something like this:
    var url: URLRequest = new URLRequest( "URL_OF_THE_PAGE" );//
    var urlVars: URLVariables = new URLVariables();
    urlVars.varName = varValue;// varName is the name of parametur  passed to server. Server page will look for this and get its value - varValue;
    url.data = urlVars;
    var urlLoader: URLLoader = new URLLoader( url );
    using urlLoader prevents change of page ( you will still in this page ) if you want to process surver page use navigateToURL( url, "_self" );

  • Find position of object in VBox

    Hi All,
    I have a outter VBOX that gets populated dynamically with
    VBOX that contain text and buttons.
    The architecture of the containers is below.
    <VBOX>
    <VBOX>
    <text>Item One<text/>
    <Button/>
    </VBOX>
    <VBOX>
    <text>Item Two<text/>
    <Button/>
    </VBOX>
    </VBOX>
    The objects that are in the outer VBOX box are created
    dynamically and do not have explicit heights.
    QUESTION: How can I get the height of each of the items in
    the outter VBOX?
    I have been doing the following:
    //Get the children of the outter VBOX
    var childList : Array = al.listBox.getChildren();
    var total : int= 0;
    for(var i1:int =0;i1<childList.length;i1++) {
    var child :Object = childList[i1];
    var childRect : Rectangle = child.getBounds(container
    holding the item);
    total = total + childRect.height;
    The getbounds call always returns 0 as well as the x and y
    coord return 1.
    Any suggestions would be appreciated.

    Hi,
    check this..
    DATA: patt       TYPE string VALUE `now`,
          text       TYPE string,
          result_tab TYPE match_result_tab.
    FIELD-SYMBOLS <match> LIKE LINE OF result_tab.
    FIND ALL OCCURRENCES OF patt IN
         `Everybody knows this is nowhere`
         RESULTS result_tab.
    LOOP AT result_tab ASSIGNING <match>.
      WRITE: / <match>-offset, <match>-length.
    ENDLOOP.
    here your pattern should be space . i.e. ' '.
    Arunima

  • Positioning of object

    I am creating a website in dreamweaver, and have a header
    that is an image. in the top corner next to the header, i have a
    flash object that expands when the mouse cursor is hovered over it,
    however it goes behind the header image, instead of infront of.
    Simple problem, but I cant seem to fix it :S
    cheers

    You may want to use the z-index style property to control the
    object appearance. If you could give us a link that would help a
    lot to solve your problem.
    Thanks!

  • As3 get position from object in other object

    please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he, but i want obtain the coordenate from the childs (MC1.Part1.x, MC1.Part1.y,MC1.Part1.z, etc), i try with trace(MC1.Part1.x), and always give me the same coordenate, i think is the coordenate in the parent, but i want the coordinate of the child when the parend is rotating.
    Please help me

    The coordinates of the child objects do not change relative to the parent that holds them if the parent is being moved, so they will report the same values all of the time.  If you want to know the location relative to the main stage, then you need to make use of the localToGlobal() method.  Try searching Google using terms like "AS3 localToGlobal tutorial" to get an explanation of how to use it.

  • Why can't i position this object??

    Hi All.
    I'm having aslight problem. I'm trying to create a sphere and position it somewhere in my scene but everytime i run the code it automatically positions it back at (0,0,0).
    Anyone got any ideas.
    The code's below.
    Thanks a lot.
    Java_chic.
    java.net.URL image_url = applet.getImageUrl( "Java3d.jpg" );
    TransformGroup tg1 = new TransformGroup( );
    tg1.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    Appearance app = new Appearance( );
    Transform3D transform = new Transform3D();
    Sphere sphere = new Sphere( 0.4f, Sphere.GENERATE_TEXTURE_COORDS, app);
    Vector3f vector = new Vector3f(x,y,z );
    Texture tex1 = new TextureLoader( image_url, applet ).getTexture();
    app.setTexture( tex1 );
    TextureAttributes texAttr = new TextureAttributes();
    texAttr.setTextureMode( TextureAttributes.REPLACE );
    app.setTextureAttributes( texAttr );
    sphere.setAppearance(app);
    transform.setTranslation(vector);
    tg1.setTransform(transform);
    tg1.addChild( sphere );
    Transform3D yAxis = new Transform3D();
    Alpha rotationAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE,
                             0, 0,
                             4000, 0, 0,
                             0, 0, 0);
    RotationInterpolator rotator =
         new RotationInterpolator(rotationAlpha, tg1, yAxis,
                        0.0f, (float) Math.PI*2.0f);
    BoundingSphere bounds =
         new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    rotator.setSchedulingBounds(bounds);
    tg1.addChild(rotator);
    bg.addChild( tg1 );
    /////////////////////////////////////////

    Sharon,
    you can try out the following code, it should work.
    Regards,
    Oliver
    java.net.URL      image_url     = applet.getImageUrl( "Java3d.jpg" );
    TransformGroup    tg1           = new TransformGroup( );
    TransformGroup    tg2           = new TransformGroup( );
    Appearance        app           = new Appearance( );
    Transform3D       transform     = new Transform3D();
    Sphere            sphere        = new Sphere( 0.4f, Sphere.GENERATE_TEXTURE_COORDS, app);
    Vector3f          vector        = new Vector3f(x,y,z );
    Texture           tex1          = new TextureLoader( image_url, applet ).getTexture();
    TextureAttributes texAttr       = new TextureAttributes();
    Transform3D       yAxis         = new Transform3D();
    Alpha             rotationAlpha = new Alpha( -1, Alpha.INCREASING_ENABLE,
                                                 0, 0,
                                                 4000, 0, 0,
                                                 0, 0, 0);
    RotationInterpolator rotator    = new RotationInterpolator( rotationAlpha,
                                                                tg1, yAxis,
                                                                0.0f,
                                                                (float) Math.PI*2.0f);
    rotator.setSchedulingBounds( new BoundingSphere (new Point3d(0.0,0.0,0.0), 100.0) );
    texAttr.setTextureMode( TextureAttributes.REPLACE );
    app.setTexture( tex1 );
    app.setTextureAttributes( texAttr );
    tg1.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    sphere.setAppearance(app);
    // Look here:
    transform.setTranslation(vector);
    tg2.setTransform(transform);
    tg2.addChild( tg1 );
    tg1.addChild( sphere );
    tg1.addChild(rotator);
    bg.addChild( tg2 );
    /////////////////////////////////////////

Maybe you are looking for

  • FI document  amount of material documents of movement type 413

    Hi When I create a material document (413) transfer post from sales order stock to another sales order stock. SAP automatically generate a FI documents. So, my question is that the amount of FI document is how to be calculated? thanks Henry

  • Passport and Time Machine...when to detach Passport from Laptop

    Do I need to keep my Passport attached to my MacBook Pro at all times, with Time Machine ON? Thought it was bad to keep Passport constantly attached in case of computer failure.

  • Installing ISM-SRE-300-K9

    We initially planned to install our Call Manager and then install our remote locations. Given that scenario, the vendor sold us SRST Routers with no voicemail capability since the plan was to have the voicemail centralized. Well, that plan has change

  • What uses data when you are actully not using phone?

    Android user here...Grandaughters i-phone 4s seems to use a lot of data. from 12:00am-6:am she used 209mb. She was asleep. Any ideas???

  • Movie or tv apps for droid x

    does anyone know where to download or watch videos,movies or tv for free.. also what about  android 2.2 for droid x