How to set the size of a control with the mouse ?

hi all,
i am writing a sort of ide (editor which creates applets very easy....) - for this purpose i need some hints from you guys:
of course i need to create some controls like buttons...
no prob - i am able to create buttons and place them at any place.
BUT WHAT ABOUT THE SIZE ?
ok, i have some ideas to realize this but what i want is a thick border arround the control with spots at each corner - when i place the cursor at one of these spots, my mouse cursor should change and it must be able to change the size of the control (while pressing and moving the mouse - you all know that from any ide).
so how to do that?
go on brains!!!
THANX,
andi

I thought about creating dynamically resizable components, but gave it up as the effort seems too much for the benefit. I did a search for info on it and found a lot of people who wanted to do it, but not any who had actually done it completely. Here's some of my thoughts on the subject. You are right on about creating 'sizing handles', it seems to me the way to do this is to create your own container for any component (extend JPanel?) which can switch between no border and your new sizing border at some event. You will need to respond to mouse clicks on this border and follow the 'drag' event to find out where it was dropped. The java drag/drop events probably won't be of any use to you because each component will need an event handler. You need to catch them all.
Finally, you need to figure out how to interact with some LayoutManager or write your own. Most LayoutManagers want to do their own resizing and you will have to deal with this. For example, GridBagLayout will not only resize all of the other components on the affected row and column, but unless you resize the other components, you won't be able to drag the top higher or the left lefter?

Similar Messages

  • Apple Watch does it make provisions for left-handers? either a mirror image version, or the ability to rotate the display 180º allowing it to be worn on the right wrist and controlled with the left hand?

    Does the apple Watch accommodate left-handed people? is there a mirror image option, or can the display be rotated 180º, allowing the watch to be worn on the right wrist, and manipulated with the left hand? Just wondering if you have thought about that?
    Thanks,
    Rick
    PS: none of the "communities " accessible to me seemed appropriate for this question, so I am posting here, hoping someone will forward it on to the proper place in Apple.

    Does the apple Watch accommodate left-handed people? is there a mirror image option, or can the display be rotated 180º, allowing the watch to be worn on the right wrist, and manipulated with the left hand? Just wondering if you have thought about that?
    There's a option when setting up the watch to set it up for left handed users. That and the easily user revisable straps will accommodate lefties.

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How can I control the size of a cell in the GridBagLayout?

    Hi,Swing Gurus
    I am developing a swing-based program using JBulider5 enterprise.
    It seems to me that the GridBagLayout is really a hard nut!
    How can I control the size of a cell in the GridBagLayout?
    It seems that I cann't control the size of a cell directly.
    But how the size of a particular cell is determined when I switch the layout manager from XYLayout to GridBagLayout?
    Thx in advance!
    Regards,
    Justine

    hi,i have not done what you are asking but there are fields like
    COLUMNWIDTH, MINSIZE, MAXGRIDSIZE, PREFEREDSIZE to which you can set the appropriate values and test for your need.hope this helped.bye martian.

  • How can I change the size of table control in table maintenance re-gen?

    Hello Experts,
    I hv created a maintenance view and after generated table maintenance view for it.
    now it adjusts the size of table control in table maintenance generation.
    I want to change the size (width) of table control and again re-generate the table maintenance.
    But when re-generation occurs, table control size is set to initial.
    why it is happening? and wt to do to solve this issue? any user exit?
    I need the changed size of table control even if its re-generated.
    Regards,
    R.Hanks

    Hello Ronny,
    Goto SM30, Enter your table name for which you have maintained your table maintainence generator .
    When the maintainence screen appears for your table name , Goto System->Status->Screen Program name.
    Copy that program name from there.
    Open that module program through SE80,this is the program name of your SM30 screen which appears when we enter our table name in SM30 transaction.
    In SE80,click the layout of the module program name you have entered there.
    Its layout will display you the table control(of SM30) present to enter your your enteries.
    In the change mode you can change its size , savee it and activate that program.
    Now goto to SM30 again and enter your table name, it will show you the changed size of the table control used to take the enteries.
    Note:This changed size is only for your table name and it will remain of its previous size for other table enteries.
    Hope it helps you.
    Thanks Mansi

  • How to set the size of JTextPane according to the size of text??

    hello
    how can i set the size of JTextPane according to the size of text it would contain in such a way that JTextPane should not have ScrollBar.

    StanislavL wrote:
    width should be defined for your container width. suppose you have a very long row of text. Widht full screen widht it wraps into 2 lines but if you set widht of your window to half screen widht there should be 4 lines.
    But you can use the same code and get preferred widht as well.u mean like this :
    objTextPane.getParent().getWidth();Edited by: 811243 on Sep 6, 2011 5:32 AM

  • How can i distinguish two controls with the same name?

    I'm recording automated tests with VS 2012 Coded Ui Test for testing a web application.
    In that web application it is possible to enter data in something looking like a list.
    There is - per example - an Edit control sitting on a ColumnHeader with the name/text "Description".
    Below that header is another Edit control for data input - containing the text "Description" too and which lies on a Cell control.
    When i playback my recording, Coded UI Test looks for a control with the name "Description" and gets the one, it finds at first.
    In that case the Edit on the ColumnHeader, which causes an exception, when the Text will be setted with the data input from the recording.
    Unfortunately the controls have no ID.
    Is there a way to distinguish controls with the same name?
    Thanks in advance!

    Hi Patrick Pirzer,
    >>Is there a way to distinguish controls with the same name?
    Based on the blog "How does “Coded UI test” finds a control ??", we know that to really find a control, it would be related to the unique properties as the search properties,
    so if two controls have the same property, please use other unique property as the search property would be better.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to set image size for importing photos from a digital camera

    I'm using Iphoto 6 and am a novice user of my new digital camera. The camera is set to HQ image quality. Initially when I imported photos from the camera into IPhoto, the images were very large (over 1 meg) and produced good quality 4X6 prints. Now when I import photos from the same camera still set to HQ image quality, the photos are very small (less than 100 kb) after being imported into IPhoto. I think I must have changed some kind of setting in IPhoto that affects the size of an imported image, but I can't find where that is or how to change it back so that the size is not changed when imported. Can someone please help me with this? Thanks!
    IMAC G5   Mac OS X (10.3.9)   my other computer is a Dell Dimension L500CX running Windows XP Pro

    Dave, thanks for clarifying Toad's response for me - I was just too ignorant to connect the dots from his responses. As you said, there were 2 versions - 1 in the original folder and 1 in data; the original folder had the photos that were 1 mb. We must have pulled from that folder previously to print photos not realizing they existed in 2 places. So when we found these thumbnail photos, we just thought they were the real thing. Where can you go to learn about the struction and hierarchy of the photos in terms of what Iphoto does to an image when you import it? Is it in Iphoto help somewhere? Thanks so much for your help with this, and you too Toad for leading me down the path.
    If you're getting the size from Finder, I think Old
    Toad's question makes a lot of sense. Is the file
    you're looking at, somewhere in a folder called
    "Data" in iPhoto Library? That 56k sounds about the
    right size for a thumbnail.
    If you do a search for the image name, both the
    actual photo and the small thumbnail are stored with
    the same image, e.g. abc.jpg
    IMAC G5   Mac OS X (10.3.9)   my other computer is a Dell Dimension L500CX running Windows XP Pro

  • How to set custom size of Close Button e.g. 32x32  of Title Window in Flex 4

    How to set custom size of Close Button e.g. 32x32 of Title Window in Flex 4?

    Hi
    Here is the code of the Button in the skin class of spark title window.
    <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
                              width="15" height="15" right="7" top="7" />
    So first change the default height and width from 15 to 32. Then in the Button Skin class i.e. spark.skins.spark.TitleWindowCloseButtonSkin change paths to modify the cross symbol.
    Hope this helps
    Rush-me

  • How to set display size of a Region or Dynamic Region?

    Hi,experts,
    In jdev 11.1.2.3,
    I drag and drop a task-flow into a jsf page to create a Region,
    and set display size for the region, source code as:
    ===================
    <f:facet name="second">
    <af:decorativeBox theme="medium" id="db1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl1"
    inlineStyle="width:1200px;height:700px;">
    <af:region value="#{bindings.trainflow11.regionModel}" id="r1"
    inlineStyle="width:1200px;height:700px;"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:decorativeBox>
    </f:facet>
    =================
    But, the Region is only showed a small fraction area on the parent jsf page whenever during design or run time.
    How to set display size of a Region or Dynamic Region?
    Thanks!

    Hi,
    the decorative box is supposed to stretch components in the center facet, so at runtime the region should stretch. Can you try with a static region to see if this is an issue with dynamic regions?
    Frank

  • How to find the Size of an Idoc With data

    Hi All,
    There is business case where in the partner needs an Idoc with size 200KB - 250KB  triggerd from SAP.
    Is there any chace of knowing the size of an Idoc with data before it gets tirrgerd from SAP.
    Please Help
    Thanks,
    Suma

    Hi Dinil,
    I have provided you with a sample that would show you the how you can get the size of an arraylist
    the sample has a page untitled1 and a bean named test.
    I have run in on jdev 11.1.2 and it is ok, it will be ok on 11.1.3
    after running the sample you will see the 2.
    please remember that you must add the JSTL taglib on the viewcontroller.
    just right click on viewcontroller, go to tag lib select the jstl.
    page
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body>
    <h:form>
    <h:outputText value="#{fn:length(test.a)}"/>
    </h:form>
    </body>
    </html>
    </f:view>
    bean
    import java.util.ArrayList;
    public class Test {
    public Test() {
    a= new ArrayList();
    Object o=new Object();
    a.add(o);
    a.add(o);
    ArrayList a;
    public void setA(ArrayList a) {
    this.a = a;
    public ArrayList getA() {
    return a;
    I hope this sample came handy.
    regards,

  • My iPod Touch will not play through external speakers when it is docked.  It only plays through it's internal speaker.  All the other functions on the iPod can be controlled by the external speakers (volume,track, etc).  How do I fix this?

    My iPod Touch will not play through external speakers when it is docked.  It only plays through it's internal speaker.  All the other functions on the iPod can be controlled by the external speakers (volume,track, etc).  How do I fix this?

    I would try in oreder:
    - Resetting the iPod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restoring the iPod via iTunes.  First from backup and if problem persists, restore to factory defaults/new iPod.

  • How to set percentage size for layout? for example : VBox,HBox,AnchorPane,.

    how to set percentage size for layout? for example : VBox,HBox,AnchorPane,......
    like HTML
    &lt;div width=&quot;640px&quot; height=&quot;480px&quot;&gt;
    &lt;div widht=&quot;50%&quot; height=&quot;60%&quot;/&gt;
    &lt;div widht=&quot;30%&quot; height=&quot;60%&quot;/&gt;
    &lt;div widht=&quot;20%&quot; height=&quot;60%&quot;/&gt;
    &lt;/div&gt;
    -----

    This is not supported. You can file a feature request at http://javafx-jira.kenai.com

  • How to set up an automatic upper case at the begining of a sentence

    Can someone help me if or how to set up an automatic upper case at the beggining of each sentence. I am doing huge amount of writing and just got fed up with it.

    What application? Pages? If so, that option (and many others) is not available in the current version. You can use the previous version which should be in your application folder. Or you can do what I finally did and use Open Office or Libre Office.

  • How do i set the iphone to auto sync with the mac book pro

    how do i set the iphone to auto sync with the mac book pro?

    Iphone Sync Support wrote:
    Thanks but this is not what I am looking for.  I am looking for the settings - setting that allows our iphone to auto sync with your mac book when you make a puchase on either device.
    You aren't going to sync with my MacBook when I make a purchase.
    And you are not going to autosync your iPod with the MacBook unless you tell it to sync or plug it in.
    You can enable Automatic downloads when you make a purchase.
    iTunes settings > Store.
    When you make a purchase, it will automatically download that purchase to devices set up the same way.
    This is not the same as autosyncing your device to your computer (as you first asked).

Maybe you are looking for

  • Acrobat 9 Professional: changing the default save setting as version 5 and later

    The situation:  We are using Acrobat 9 Professional.  We have PDF files with version that was save as 5.0 or later.  (We need to save it as 5.0 because it allows our PDF publications to be shown on mobile devices that don't support newer versions). 

  • Seeking file upload help.

    Hi, This has been frustrating me severely of late.  I have two pages that visitors of my site shall go to for uploading photos.  The first page is a simple two question form asking them to enter how many photos will they be uploading in a text field

  • NSLog - Quick Dumb Question

    OK, where does the output appear when putting NSLog statements in your code? I can't find it. I've put code in like NSLog(@"Got here") and enumeration of dictionaries but nothing ever shows up in the Simulator/Debug Debugger Console. Isn't that where

  • Need tutorial or help for similar project

    I know how to make an onpage embedded video play but..... I'm looking into doing something like this: http://deidox.com/films/lindsay/ then click the red "click to play lindsay's film". I need to work on making a similar type thing. Not necessarily w

  • Re: Can't open CS5.5 in CS6 (branched)

    (Branched this thread from Can't open CS5.5 in CS6) I have the same problem. I've been working with CS5.5 for 1 year. Know, I've upgrade to CS6 and I can't open my CS5.5 files. This files are mine (not of a partner), I've made it so I can't understan