Set size and location of  a component

Hello,
Does anyone familiar with this org.netbeans.lib.awtexttra.AbsoluteConstraints(). I want to set the size and location of the component, and I know this org netbeans can provide this function.
getContentPane().add(chkTausta, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, -1, -1));
chkRakkennus.setSelected(true);
chkRakkennus.setText("Rakennukset");
then it comes an error that org.netbeans.lib.awtextra.AbsoluteConstraints()cannot be resolved. Does anyone know what�s the reason. Do I have to download other version of Java. I have Jre1.6.0?
Does anybody knows is there another way to set size of component. For example, if I use borderlayout, and put a button to the west, then how can I set the location and size of the button?
Thanks a lot for you help.
Clare

org.netbeans.lib.awtextra.AbsoluteConstraints isn't part of the JDK. I suggest you don't use that at all. Let a LayoutManager do the resizing.
Have a look at the [Layout tutorial|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html] especially gridBagLayout

Similar Messages

  • Finder window size and location not remembered

    I have OS X 10.10 installed.
    When I press Cmd/shift/H to open a finder window showing my home folder I get the default location and size for the window.  I resize and relocated the window and close it.  When I press that key combination again, the window is now showing the new size and location I previous set.  Unfortunately, when I restart the computer, this modification is lost and when I press that key combination the window opens with the default size and location.
    I have used the key combination of Cmd/Shift/A to open a finder window showing Applications and Cmd/Shift/U to open a finder window showing the Utilities folder.  I have been successful in resizing and relocating these windows, and having the system remember my modifications after a restart.  It appears to only be the Cmd/Shift/H combination that is faulty.
    Any ideas how to fix this problem?

    Paddster7,
    You could try trashing the hidden file inside the folder that stores some of its positioning and size settings.
    To show your hidden files.
    Launch ( Terminal ) -> Paste in the following ( defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder ) -> Press Return.
    Open the ( Offending Folder ) -> Delete ( .DS_Store ) -> Restart -> Move folder how you want to to stay -> Restart -> Did it stay?
    To reverse your hidden files back to hidden.
    Launch ( Terminal ) -> Paste in the following ( defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder ) -> Press Return.
    Supporting Articles
    http://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/
    http://en.wikipedia.org/wiki/.DS_Store
    Hope that helps,
    Weston

  • Default size and location, dialog boxes

    how can I set default size and location of dialog boxes? I have tried several things to no avail,
    thanks in advance

    1. You could create your own subclass of Dialog/JDialog with your defaults set automatically
    2. You could create a DialogFactory that creates Dialogs (pretty much the same as 1)

  • Opening Multiple Folders (Sizes and Locations)

    In selecting multiple folders and opening them all, is there a setting available or something a person manually does to when you open the folders they all open with the same size window and/or pattern? When I open multiple folders up they open up in random sizes and locations on my desktop.

    There's no built in way of doing what you want. You might give Default Folder X a try.  I've not used it so don't know if it will do what you want.  You may have to write an Applescript to do what you want.

  • Circular and oval cropping at set size and resolution?

    I know how to use the M tool to create circles and ovals and i know you can set that to certain dimensions, but that doesn't do everything I need.
    How do you crop circles and ovals out of a photo, at a set size (for example, a 1 inch circle ) at a set resolution for printing?  What I need to do is crop circular and oval images out of a photo, say at 250 dpi, then paste them onto a blank white page for printing.
    So if I've got let's say a photo that's 14x10 inches at 300dpi, I want to be able to go in, crop out an oval or circle, with as much or as little of the photo that I can or want to, setting that automatically to a certain dimension and dpi, then paste it into a blank white page I've already created at that same d
    When finished I'd have maybe 20 or 30 images on a page that I can flatten all the layers and print.
    I can't find a way to set size and resolution with anything other than the regular square crop tool.

    You can make an action and use it as one step automation to achieve that on an initial selection.
    Step by step instructions:
    With the Elliptical Marquee Tool, make the desired selection on a image.
    Open the Actions panel (Window > Actions (Alt+F9), from its menu at the top right or corresponding buttons at the bottom, choose New Action, and in the dialog that appears press the Record button.
    From the Image menu, choose Crop.
    From the Selection menu, choose Inverse (Ctrl+Shift+I)
    Press the d key on your keyboard to reset the foreground/background color swatches.
    Press Ctrl + Delete keys on your keyboard to fill with white.
    From the Image menu, choose Image Size (Ctrl+Alt+I), make sure the Resample Image is checked, and in the Document Size section enter the desired dimensions and resolution and press OK.
    In the Actions Panel press the Stop Recording button.
    Now you can copy or drag the image to another image.
    For the next image make the oval selection, go to the Actions panel, select the actions you created above, and press the play button. You can also create a keyboard shortcut in the action's property accessible by double clicking the action.
    The creation of this action assumes that in the final image you will be composing oval images on white background without overlapping their rectangular bounding boxes. If you plan to overlap them then the action must be modified to make the image a transparent layer and delete outside the oval instead of filling with white.

  • What Preferences Control Window Size and Location?

    I have a number of windows that over time have taken on weird sizes and locations. For example, a print window habitually shows up with the print button underneath the dock, forcing me to move the window to click on the options.
    Is there a preference I can trash--or anything else I can do--to return the sizes and locations of windows to something resembling normal?

    That's done by each individual application.
    Many will remember where the window last was, and re-open it in the same place & size.
    Find the preference file for the app in question (probably in <your home folder>/Library/Preferences folder), quit the app, rename the file (append "old") to the end, and start the app again.
    The window should open in a default location; move/and or resize it, close the app and open it again. If that fixes the problem, trash the "old" file and re-enter any other preferences.
    If it doesn't fix it, you've probably got the wrong file. Close the app. If there's a new version of the file you renamed, delete it. Remove the "old" from the previous one.

  • Camera Raw cache size and location

    I've been using ACR for about 3 years now, and today it occurred to me that I'm not that sure I know what the cache is actually used for. I mean, I know what a cache is, but what is ACR caching, and why?
    I use Bridge for most of my photo work, displaying high quality thumbnails and previews, often full-screen ("monitor-sized previews" by default). Bridge has its own cache, which I understand contains jpegs of thumbnails, previews, and 100% views. Does ACR's cache have any bearing on Bridge's behaviour and performance, especially with thousands of raw images?
    What sort of size and location of ACR cache should I be using - what factors do I need to consider?

    Hi,
    I'm still not sure what size of cache I should use, and what are the advantages and disadvantages of bigger or smaller ACR caches.
    Maybe Eric can tell something indeep about the impact of a large cache.  I'm not sure about that myself, but don't believe a larger cache is a real disadvantage, as long the disk on which it reside is maintained: defrag often). Since Bridge and ACR work hand in hand here, it might depend to your workflow and to your hardware. Sorry, I can't give a clear answer here.
    As said I would put it just large enough for a certain number of RAW or some weeks work. Means, when there is a chance I'ld touch a certain RAW in six weeks again, than six weeks * x images per day I shoot.
    Not sure if you are a Pro. I'm not and usually have not much new images every month.  I always was fine with the default settings.
    I don't work with Bridge and open one RAW after another in ACR, or maybe 20+ in a row when doing panorama ;-)
    But Bridge has to do a lot of work on the fly when it generates the previews for all new RAW in a folder, like: "read the image from HDD", "process it by ACR, "write Bridge previews and metadata to HDD", "write to ACR cache " - not necessarily in this order.
    And it seems it does this and some additional steps always (not only when first time reading RAW), because it f.e. needs to check if there are already processing information in ACR database or XMP file for a RAW or if they have been created in "meantime". Means ACR settings could have be changed after Bridge did a first time generation of the cache data, maybe because the RAW was openene directly via PS or by another app.
    this process is fairly processor-dependent, especially now that ACR uses more sophisticated processing in version 6, and, depending on ACR defaults, this can be significantly slower than in previous versions.
    And Bridges eats huge amount of memory as well - seems it holds a lot of information in memory before flushing it to disk.
    After reading this post of yours I made a test with my 12k RAW the other day. I tried to let Bridge create previews for all of them in one step, but it ended up complaining that there is not enough memory after ~ half an hour.
    Bridge appears to generate previews unnecessarily sometimes, because every image is already cached.
    See above. Bridge/ACR checks for updated processing information in XMP or ACR database and metadata updates. If it find some it might need to rebuild its cached image.
    Why would I need to reset the cache with a new monitor profile? Surely this is not applied to cache JPEGs?
    You are right, sorry I mixed things up here :-(  I meant ACR camera profiles. Aside that I changed monitor profile a lot over the last weeks doing some tests, and after that Bridge often refused to start until the cache was purged…
    Your suggestion of a larger cluster size is very interesting, and I may try this when I have some spare time.
    All my disks meant for storing large files (images, music, scratch, temp-file) are formated with a larger cluster size. It speeds things up a bit.
    Supposedly Lightroom's catalogue system is superior, but I am yet to be convinced that putting all my XMP data in one basket is a good idea.
    Of course LR shares ACR's cache. I don't know much about LR, but I believe XMP are not only kept in one basket here, right? They are written to the images and in case of RAW to XMP files. Otherwise there wouldn't be an interoperability between LR and Bridge. Similar to Bridge LR stores previews in it own "cache" which is as well a folder and file based "database". Check "preferences".
    But as said I use another DAM, in which’s database all data needed for searching is kept, but I also write all metadata (IPTC,XMP) to the images, even for RAW files. By this I don't need a large ACR cache and also don't have XMP files around, which I hate. When saying database, I mean a real database, not a collection of files which are kept on disk. ;-)
    Aside other advantages, I can take my database with me on vacations and can work on my images like I do at home. I have all my keywords and categories with me in one file and when back, I just copy the database to my desktop.

  • Remember size and location when opening saved document (CS5)

    Greetings,
    It would be nice to have a preference to remember screen rendered document size and location when saved, then the document opens at the last used size and location; I now reposition and resize every time I open my documents, which is often.
    Perhaps this feature has not been forgotten or omitted, maybe I just haven't found it yet?
    Garrett

    "I now reposition and resize every time I open my documents, which is often."
    Yeah, you said it... Which means that 100 times a day I curse Adobe for not including such a basic, fundamental capability.
    It's hard to believe that they do any testing by real users at all... How could they have missed this? And why haven't they immediately fixed it in a point update?

  • Defining non-Component objects with size and location using Swing

    I am attempting to write a program which will be able to manipulate (display, move, resize) objects in a Swing window which are not necessarily components. These "Window"s are defined by a Window interface which defines a Window as any object which has a size and a location (effectively a rectangular area). This would ideally allow me to perform operations such as drawing an arbitrary picture on a Jpanel, for example, wrap that drawing in a rectangular area, and then be able to resize it/move it about as a separate panel. In order to do this I believe I would have to override the paint() method, although I'm not completely sure. If anyone has any suggestions of a proper way to override the method or know a proper way to attack this problem, I would greatly appreciate it.
    Thanks,
    Adrian

    It's hard to say since it's not quite clear what you're doing but:
    1) if these objects are not necessarily components, that's fine, but you're not trying to add them to the basic GUI framework, are you? If you want to do something like this, then probably the best thing is to have a particular component that knows how to handle these objects, and then have a clean separation between components and non-components at that level. So this component would maintain and display a collection of those non-component objects, but no other component would be expected to know anything about them, and the non-component objects wouldn't know about any components at all.
    2) it might be helpful to give all the non-component objects a method that looks like this:
    void drawSelf(Graphics g);and that this method would tell the object to draw itself on that Graphics object. The object might also have an "offset" value, essentially an x,y position, and it would draw itself relative to that position.

  • How to keep default Finder window size and location from Mac server

    Working in an office of three people.  Mac mini server (not sure of the OS; I think it's Snow Leopard).  We each use iMacs with Mavericks.  I have my default new Finder window set to open "customers" folder, which resides on the server, in a specific orientation.  If either of my co-workers opens "customers" and resizes that window on their machines, it retains that size & location when I open it again on my machine (as I'm sure it does to them after I "fix" my own window).
    Is there any way to change this so that one's own machine will remember the window prefs?  I mean, we're not opening on the server itself, so in my mind it should not retain the last open position, right?
    I know I could set my default folder to Home, then go to customers from the sidebar, but that almost defeats the purpose of the default folder.
    thanks in advance!!

    Hey Macdaddy,
    This happens all the time with our server at work. The server window never opens in the same place twice, and it can be annoying.
    There are third-party window management tools out there, but what I did was use a macro program called Keyboard Maestro (since I already owned it).
    Among the many things Keyboard Maestro can do is manipulate a window. I created a macro that moves it to a specific point (in my case, the upper left corner of the screen) and then resizes it to a specific width and height in pixels. I then assigned the macro a keyboard shortcut.
    Now, when I mount the server, I can use the keyboard shortcut and the window is right where I want it.
    There are other programs that just move windows, and I tried a couple. But Keyboard Maestro is more elegant in my opinion, and it does a whole lot more if you choose to go that route.
    Hope this helps.
    Andy

  • AppleScript That Saves Finder Window Size and Location

    I wrote the following AppleScript to position and size Finder windows, but the Finder doesn't "remember" the settings the next time I open the windows.
    tell application "Finder"
    activate
    make new Finder window to disk "Hard Drive"
    set toolbar visible of Finder window 1 to false
    set current view of Finder window 1 to icon view
    clean up Finder window 1 by name
    set position of Finder window 1 to {30, 55}
    set bounds of Finder window 1 to {30, 55, 400, 625}
    make new Finder window to folder " Files" of disk "Hard Drive"
    set current view of Finder window 1 to icon view
    set toolbar visible of Finder window 1 to false
    clean up Finder window 1 by name
    set position of Finder window 1 to {410, 55}
    set bounds of Finder window 1 to {410, 55, 975, 455}
    close Finder window 1
    close Finder window 1
    end tell
    How do I make it so the Finder will remember the location and position?

    Hello
    Here is a script that I use daily.
    The code used to force the Finder to "remember" the window position seems a bit tricky. If I remember well I found it on MacScripter.
    As far as the Finder is not corrected, we must use this kind of trickery.
    --[SCRIPT]
    my commun(choose folder)
    on open (sel)
    my commun(sel's item 1)
    end open
    (* set bounds to {10, 50, 800, 600} *)
    on commun(F)
    set F to F as Unicode text
    tell application "Finder"
    if class of item F is document file then set F to (container of item F) as Unicode text
    if ((class of item F) is folder) then my set_bounds(F, {10, 50, 800, 600}, false)
    end tell
    end commun
    on set_bounds(F, b, toolbar)
    local ao, i, lesFichiers, fichier
    tell application "Finder" to tell folder F
    set lesFichiers to every file
    repeat with fichier in lesFichiers
    my saveImageWithItselfAsIcon(fichier as alias)
    end repeat
    tell container window
    set ao to class is Finder window
    open
    set current view to icon view
    set properties of its icon view options to ¬
    {arrangement:arranged by name, icon size:128}
    set bounds to b
    set toolbar visible to toolbar
    set toolbar visible to not toolbar
    set toolbar visible to toolbar
    if not ao then close
    end tell -- to container window
    repeat with i in (get folders)
    my set_bounds((i as alias), b, toolbar)
    end repeat
    end tell -- to folder F then to Finder
    end set_bounds
    on saveImageWithItselfAsIcon(F)
    tell application "Image Events"
    launch
    try
    tell (open F)
    try
    save with icon -- save iconimagefile with itself as icon
    end try
    close
    end tell
    end try
    end tell
    end saveImageWithItselfAsIcon
    --[/SCRIPT]
    Yvan KOENIG (from FRANCE mardi 13 mars 2007 20:51:14)

  • Remembering the size and location of a frame

    I would like my application to remember the location and size of the frame when closted and restarted.
    First I thought that I simply could store the settings in a file on close, and on startup restore those values.
    But then what if the user maximizes the frame? The those settings would either be the same as when started or the maximum size, so theres no way to remember the latest size in Frame.NORMAL state.
    So I was wondering how you guys solve this? Is there a listener I could use to catch some window rezise event with?
    Best regards
    S�ren

    There are a couple listeners you could use on your JFrame:
    1. ComponentListener's componentResized event will be invoked after the JFrame's size is changed.
    You could examine the state to see if it's NORMAL (not iconified or maximized) and store the latest
    normalized size, to be saved at application shutdown.
    2. WindowStateListener: this is called after the state changes, and I've noticed that calling the JFrame's
    getWidth and getHeight methods here sometimes returns the new dimension, sometimes the old!
    Option 1 seems an all-around better choice.
    Also, if you're saving state in a file -- check out java.util.prefs -- it rocks and it's easier than file i/o!

  • Unable to set  size and scroll bar to table components in visual web jsf

    Hi Friends,
    Good day all of you,
    my requirement is to display multible tables in the same jsp page with same size.
    if some tables have more columns than other tables then that table need horizontal scroll bar...

    Hi BalusC,
    Good day,
    we didn't use any CSS sheets.is there any other way to set.

  • Opening Numbers and getting the same page size and location each time

    Can someone help me with something which is pretty basic, please?
    When I open a Numbers spreadsheet which I use frequently, each time it opens as a tiny box and always has to be resized and repositioned onscreen before I can start work.
    I figure there must be something I can do to have it open in the same screen position and the same size each time, but what?

    Hi Norman,
    Your tags show OS X Mavericks 10.9. The latest version of Mavericks is 10.9.2
    Are using Numbers 3.0 ? The lates version of Numbers is 3.1 and it does save the zoom.
    Maybe this will help, but it does not work in Numbers 3.0
    Numbers > Preferences > General > Default Zoom > 100% (or whatever % you want).
    And Save your document before closing to retain the zoom and position.
    The Numbers *window* size can not (yet) be saved, but the zoom and the position within a sheet can be saved in Numbers 3.1
    Regards,
    Ian.

  • PHP and result sets: size and time

    Hi
    I'm tasked with debugging and "fixing" a PHP application which (someone else developed) is running slowly and "timing out", now that data is in there. I set about inserting some brief timing "debug" stuff within the code to attempt to determine where the rate limiting steps were happening. I found two areas in the code which were quite slow:
    1) Query of the oracle database via a package, declaration of the procedure is:
    procedure findAllSorted(sortMode in string, resultSet IN OUT types.cursortype);
    2) looping on this and filling the array into objects
              while ($res = $result->FetchRow()) {
                   // don't use $array[] = $this->load($res);, it throws an error
                   $array[] = $this->doLoad($res);
    My method timed the execution of both these steps:
    1) Execution for oracle is:11.60035777092 Seconds
    2) Execution for loop is:17.87319111824 Seconds
    the amount of data that is returned by the fiindAllSorted() procedure is not what I'd call high, although that is part of my question here ... how much is a lot?
    When I execute the procedure in PL/SQL Developer (and get all rows, not just the first 10) there are 1600 rows returned. When saved as a CSV file its about 260K of data ... I would not have thought this was problematic.
    the other part of my question is (assuming people don't say "holy cow you're returning one thousand six hundred rows") how can I speed this part of the step up?

    What values of oci8.default_prefetch or oci_set_prefetch() have you tried? See the discussion on p149 of The Underground PHP and Oracle Manual. I wonder if you are still using OCI8 1.2 with the lower default value.
    Pre-fetching from REF CURSORS was first supported with Oracle 11gR2. You only need 11gR2 client libraries - pre-fetching from basic REF CURSORS will work when connected to older DB versions. See my blog post about Oracle Database 11gR2 Enhancements for PHP. New client libraries are available free from OTN. If you can't upgrade your Oracle Client libraries then perhaps you can refactor findAllSorted() and use pipelining. This is discussed on p172 of The Underground PHP and Oracle Manual.
    Make sure your queries only select the columns you need.
    Rasmus Lerdorf's recent talk http://talks.php.net/show/digg has some good overall PHP analysis and tuning tips.
    To finish up, here is output from repeating a query with different prefetch values:
    Time to fetch 1600 rows. Prefetch is 500 : Fetch time is: 0.085 seconds
    Time to fetch 1600 rows. Prefetch is 100 : Fetch time is: 0.090 seconds
    Time to fetch 1600 rows. Prefetch is  10 : Fetch time is: 0.144 seconds
    Time to fetch 1600 rows. Prefetch is   0 : Fetch time is: 0.508 seconds

Maybe you are looking for

  • How do I get my gallery photo pages in iweb to publish on my site ?

    HI I have recently upgraded to iweb 09 from iweb o6. I have also upgraded from tiger to snow leopard and now have a terabite size hard drive. Iweb was working great before , but now i cannot get my website to upload correctly using ftp fetch. fetch i

  • HP Deskjet 3150 not connecting to Airport Express

    I just purchased an HP 3150 Photsmart printer and try as I may I can't get it to print wirelessly via my Airport Express. I went to the HP website and downloaded their driver, tried re-installing from the CD, repeated both several times--nothing. Wha

  • Excise mandatory

    Hi, While making GR, if the PO is having excise duty applicable, we have to capture excise invoice before posting GR.The item  is checked for capturing excise invoice.If somebody selects NO EXCISE ENTRY while Gr creation, system allows to proceed fur

  • No Color at all!

    Installed the latest version of the Final Cut Suite on my MacBook Pro, but Color wouldn't install at all. Not a trace of it. Anyone knows why? Thanx in advance. Fabrizio.

  • Deleted Library

    My computer had to be fixed, and now that it works my iTunes library is gone... the whole thing. There are absolutely no songs in my library. What do I do? Please help a "damsel in distress." Thank you.:)