How to group objects in a border?

Say I have a couple of objects - a JTextField and a JButton and I want to put a border around both of them, similar to that in the ButtonDemo in the SwingSet2 application. How would I go about doing this? Do I need to set up a new panel? I'm a newb to this so please explain slowly are carefully =)

well that depends on what your gui should look like of course. but let's guess you have a JFrame f and you want to add two buttons - one above the other. then you would do something like:
JFrame f = new JFrame("test"); // create a frame
JPanel p = new JPanel(); // create a panel
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); // set the layout of the panel
p.add(new JButton("top button")); // add first button to panel
p.add(new JButton("bottom button")); // add second button to panel
f.getContentPane().add(p); // add panel to framehope that helps
Michael

Similar Messages

  • How to change the groupType attribute of a user group object?

    I'm trying to change the "groupType" attribute, of a user group object, from 'Distribution' to 'Security' (and the group scope is set to 'Global').
    The CAD bit mask value needed would be: 0x80000002 (Decimal -2147483646).
    How to change/modify the "groupType" attribute for this user group object?
    Thanks,
    UD

    Attribute attr= new BasicAttribute("groupType", "-2147483646");
    items[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE, attr);
    ctx.modifyAttributes(dn, items);
    --does not work.
    javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 00002141: SvcErr: DSID-031A0B56, problem 5003 (WILL_NOT_PERFORM)
    Is it possible to modify it?
    Thanks,
    UD.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to add Spin animation to grouped object

    Hello,
    I would like to add a spin animation to a grouped object, but it is not available on the selection list. Is there anyway to overcome this issue? I tried loading the grouped object as an image but still no avail

    Hmmm ... I'd never noticed this before, but now when I try it, I can't either. SPIN is apparently unavailabe as an animation for both grouped objects and images, and I can't think of any way around that. But TWIRL is close - as I'm sure you already discovered. Looks like something you might want to suggest to Apple, at: http://www.apple.com/feedback/keynote.html
    Sorry.

  • How do I add an overall border to my document?

    Hello.
    Just wondering how to solve this one that has perplexed me for awhile.  I know that there's a solution, but cannot seem to locate it when I need to.
    Here's my question as I put it to the Pages Help Feedback people:
    I have a document I have created in Pages.  It is all done, and includes text boxes full of text, and several inserted several pieces of artwork, imported pdf's.  I could not figure out how to add a border around all of the document, so I went to Pages help, where I punched in "Adding Borders", and up came the title "To add borders and rules to your document".  This looks straightforward enough, I thought.
    Not so fast.  Here are the first two instructions: "1. Select the text to which you want to add borders and rules." I selected all the various text boxes.  "2. Click Inspector in the toolbar, click the Text button, and then click More." Did that too.  When I chose a border, it placed a border around only one of the text boxes.  Now I am stymied.  I want to put a border around the whole document, but there are no other solutions here, even after I have read for clues on the entire help page.
    I will not get a response from them, so I am turning to you.  I do have some idea that it might have to do with a document vs a poster, and I believe I set up my project to be a poster, if that can be useful here.  
    Thank you in advance for any help.
    Cea

    It says "Select the text to which you want to add borders and rules." That is the text in the text layer in a word processing document, not text boxes.
    Do you have a word processing document or a page layout one. Tells you to the right of the document name.
    You could use a shape object with a Border but without Fill. It shouldn't have any wrap and then Send objects to  background after you have resized it and duplicated if you need it for the next page.

  • Grouping objects in Pages 5.1

    I apologize is there is another thread for this question but I searched as best I could and couldn't find one.
    I have recently upgraded to Pages 5.1 (not because I had any desire to, but simply to stop the annoying pop-ups telling me to update it). I was reasonably happy with the older version, which handled most of my document needs.
    The 5.1 version has many changes that I find annoying (such as the evident inability to convert text into tables and vice versa), but I thiink I have found work-arounds for all the problems except one. (My prreferred solution would be to go back to the old program but that seems not possible.)
    I cannot get simple objects to "group." I only use "shapes" provided from insert and text boxes. I do not need to know how to group graphics created outside of pages (although it would be nice). But two simple "shapes" that Pages itself provides, when I click on them both and go to the "Arrange" pull down, the "group" function is not on (as it would have been in the old program) and I can't group the objects.
    I realize this may not be the most pressing issue with this new program, but it is cusing me a great deal more work. I used the feature to create fractions in algebraic equations and I could copy and paste a grouped fraction and change the variables, exponents, numbers, etc., quite easily. Now I have to create each fraction from scratch, because the parts don't easily stick together when I copy and try to move one.
    Thanks for any help you might offer.

    Thank you, Peter.
    I had some trepidation bothering you all with my trivial question, but I end up having more information that I ever expected. I really thought I would either be plagued by a dysfunctional WP or suffer endless harassment about updates. Ironically, when I went back to retreive the old Pages at Viking's suggestion, the first thing it asked me is if I wanted an update.

  • Flowing Grouped objects

    Hi All,
    I am working on a product catalog in InDesign 6 and need some help flowing grouped objects (2 images and 1 text frame) through a 3 column 2 row layout. How do I set it up so when I add more products/grouped objects the current products flow to the next cell or even next page? I'm stuck! Any help on this would be greatly appreciated!

    Use anchor object to anchor image to text, then when move text the image move with it.

  • Powershell - Select-Object -Unique vs Group-Object

    Hi,
    I have the following problem with powershell.
    I have a list of strings call it $machine_list which
    I know there are duplicates.
    The following  code produces the following output:
    $machine_list.count -- 15375
    $a = $machine_list | Select-Object -Unique
    $a.Count -- 12134
    $b = $machine_list | Group-Object -NoElement
    $b.Count -- 12082
    I am trying to get a unique list and looking at different
    ways of doing it.
    So in my example above why are the counts different?
    Should they not be the same - $a.Count -eq $b.Count?
    I am hoping somebody can explain this in more detail to me.
    Also is there a way I can compare the results to see how they
    differ? (Comparing $a with the Name Values of $b).
    Thanks,
    Ward.

    Dirk - another way to think this out.  "group" means that each named group has a unique name.  In a list of strings the group name and object are identical so the list of group names is the list of identical strings.
    Select -unique and sort -unique produce an identical set of lists.  Select -unique, however, does not necessarily produce a sorted output although the output is guaranteed to be unique.  What you may be mixing up is that many learned to add sort
    in PowerShell V1 because they did not get a sorted output from a unique operation.  As I posted above, this issue has come up constantly as people start to learn databases.  A company that I used to work for wrote its own 'uniquing' code.  It
    always produced a sorted output as a byproduct of the method.  When we implemented SQL database technology the programmers could not understand why select unique in SQL did not produce a sorted output.  They constantly complained that it was a bug.
    In most cases we would like a uniquing operation or not sort the results.  Suppose I have a result set order a specific way.  Now I want group it on a column but I do not want the order of the records changed.  Grouping and select unique should
    not change the order.  There are many discussions in the database field as to why this needs to be.  I am not sure which set of standards PS follows.  In PS1 it appeared to follow the industry standard.  Maybe I will test it later.
    ¯\_(ツ)_/¯

  • Using grouped objects as drag and drop source

    I am creating a drag and drop interaction. I have an image grouped with a text area and would like to make them draggable together as a single drag source.
    However, even though they are already grouped, when I edit the drag and drop interaction, they can only be specified as separate sources.
    Is it possible to use grouped objects as a single source? How?

    Have tons of workarounds, but none for this. It is simply not possible to indicate a group as a drag object, you have to put everything in one object. Maybe if you explain what is in the group?

  • Transform group objects

    Hello Illustrators.
    I've came across a thought, how to transform a grouped object. like in Photoshop when we use the distort transformation, we can manipulate the corner points
    for a particular occasion. Here in the example I have 3 rectangles one smaller than another, and I I have grouped them. Now I'm trying to figure out a way how to adjust
    the shape into the grey one. I have used the free distort tool, but does no justice. because there is no preview so I cannot see how it adjusts. I'm only after the equivalent of the distorition
    like in Photoshop.
    Thank you.

    The root problem--as I've been pointing out here ever since Illustrator acquired envelopes--is that Illustrator envelopes insist on being created with their curve handles auto-extended. FreeHand, by comparison, provides you a choice of whether a rectangular envelope has its handles initially extended or retracted. So such a thing in FreeHand is as no-brainer simple as applying a rectangular envelope and then dragging its four corners to where you want them (just as in Photoshop).
    To do that in Illustrator, you have to tediously set up guides so as to try to replicate the proportional positions of the envelope's extended handles on each side, after moving the corner points.
    Using Envelope>Make With Top Object only works sometimes, because that feature does not provide any means by which to instruct the program which corner of the artwork is supposed to map to which corner of the already-drawn envelope shape. Instead, it just makes its own "guess" according to the ever-tyrannical horizontal/vertical axes of the page.
    JET

  • Placing a Grouped Object in Library

    Is there a way to place a grouped object in the Library? For example, I have a smart object (0% opacity with 0 border) placed over a custom button grouped together. This grouped item will not always be placed in the same location, so it's not like I can just place them on a template slide. I realize I could just copy and paste from another page, but for a cleaner solution, I would like to just be able to pull it right from the asset library. Is this possible? I am using Cp7.
    Thanks in advance for your help on this. This would be huge.
    Kevin

    No Kevin, that is not possible. But why do you use a smart shape over a button? You can use a shape as a button? But of course, too bad that a shape will never be in the library (as is the case for buttons). You can copy/paste within the same project, or create a template to have them available for future projects.
    Lilybiri

  • Error: Accessing grouped objects in tab control

    I have encountered an error where I cannot use/select objects within a tab control because they are grouped together. 
    If I copy/paste the tab control it shows them grouped and I can select them but as it stands in my program I cannot select the objects.
    I would just copy/paste and work with that but I have property nodes and additional code for each of the 20 objects and would rather not have to go back and relink each property node and wire the new controls within the BD. 
    I am looking for a way of accessing the objects without having to copy+paste/recode anything.
    Please note that there is a recent post about this tab control grouping error but is geared more towards adding an error notifier to LabView rather than how to fix the error. 
    Solved!
    Go to Solution.

    "Are these objects grouped because they are in a cluster or possibly because they were grouped using the reorder menu?"
    The objects were grouped using the reorder menu on the front panel and then placed on a tab control.
    The issue was that when I tried clicking on any of the grouped objects within the tab control on the front panel, nothing would happen.
    If I double clicked, I would select the tab control on the BD. 
    I got rid of the bug by selecting everything on my BD and copying it into a new, blank VI.
    Once I did that, I was able to access the objects that were grouped on the tab control.
    Sorry for the late reply-- once I got it working I was only focused on finishing my task.

  • Editing the display time for grouped objects

    Hello, I am having issues editing the display time for grouped items. I am using Captivate 7 and I love how now the grouped items only show as one item in the timeline because it reduces the number of rows visiblein the timeline for each object on a slide. However, now that the grouped objects no longer individually appear in the timeline, I can't make any display adjustments to the grouped objects as a whole.
    Has anyone else had this issue and is there a work around? My main issue is that if I have to extend or shorten the audio for the slide, and I have assigned an advanced action to the grouped object, in order to adjust the grouped object to match the audio, I have to now ungroup, make the adjustment, regroup, then reset the advanced action using the new group name. It is frustrating and time consuming.

    To expand and view the grouped items on the timeline, you need to click the Arrow symbol next to the group name. Once you expand, you can select the individual object and adjust the timings.
    Alternatively, you can select the individual object of the group on the slide and adjust the timings from the Timing accordion. You can do this without ungrouping.
    Sreekanth

  • How many group policies can be applied to an OU?

    Hi,
    I just want to know about how many group policies can be applied to an OU?
    I have 7 different GPOs but only 2 or 3 are applied. How can I troubleshoot this problem?
    reg
    A

    GPOs are actually applied by users or computers. Each object can process 999 GPOs. If you have GPOs not being applied, it most likely is a scoping issue.
    Check out this guide and let me know what you find:
    http://deployhappiness.com/top-10-ways-to-troubleshoot-group-policy/
    If my answer helped you, check out my blog:
    DeployHappiness. Subscribe by
    RSS or
    email. 

  • Changing Line Thickness on Grouped Objects?

    So I'm changing my style of animation from hand-drawn art to the usage of things such as the line and pen tool, in Adobe Flash CS3. I am drawing characters that have segmented parts, I.E. the arms, legs, head. body, ect are all separate grouped objects with a set line thickness. The problem is that when I try to shrink or grow the character, the lines making up their body is either too thick or too thin, depending on whether I make him bigger or smaller. It seems that I am unable to change the line thickness of grouped objects, or dare I say it, a group of grouped objects. The properties panel greys out when I select an object, so I have no access to it at all. I dont want to have to go and change the line thickness individually on each object, whose lines are all the same thickness to begin with.
    Is there any trick or plugin I can use to change this, so the line thickness of grouped objects can be changed? Or am I just ignorant with the answer just staring me in the face? Either way, I would REALLY appreciate the help any of you could provide!

    Okay, so I seem to have found an even better solution to my problem than what I was hoping for. I can just convert the lines into fill by going to Modify > Shapes > Convert Lines to Fill. This makes it so the lines will now change in relative size depending on how much I shrink or grow an object.
    Thanks for trying everyone, but I found my solution!

  • "Disable account if failed attempts exceed x on" group object

    When setting up a group in ACS 4.1, how do you include the "disable account if failed attempts exceed x" on the Group object. I see there have been some topics on this for older ACS versions (3.x) where it was not possible. Just wondering if anyone knows if this is possible on ACS 4.1 or possibly 4.2?

    Hi,
    In newer version also 4.x, this can only be set on only user setup.
    Can't set this on group level.
    HTH
    JK
    -plz rate helpful posts.

Maybe you are looking for