Smooth animated moving/resizing of JDialog

Greetings all,
I'm not sure if this belongs here or in the Java 2D subforum, but whatever. I'm working on a Swing desktop application whose main frame is laid out in a 3x3 GridLayout. Some of the panels in this grid have JLists with very long entries in them, and our users frequently complain that these panels are too small, so we'd like to implement the ability for them to "pop out" into bigger panels temporarily. We did this by simply removing the panel from the grid and dropping it in a JDialog of suitable size.
Now, it may seem pedantic, but I'm interested in making this as pretty as technologically possible. My approach thus far has been to make the JDialog undecorated and initially position it directly where the original panel was, then animate it growing by having a Timer call SetBounds with increasing parameters until the desired maximum size is reached. This looks pretty nice, but it's kind of jaggy and flickery. Is there a better way of doing this that takes advantage of Java's graphics capabilities?
Thanks!

We did this by simply removing the panel from the grid and dropping it in a JDialog of suitable size.It would probably be better to simply grab the model from the list and use it to create a new JList that you add to the dialog, that way you don't need to worry about replacing the list after the dialog is closed, because a component can only have a single parent.
then animate it growing by having a Timer call SetBounds with increasing parameters until the desired maximum size is reached. This looks pretty nice, but it's kind of jaggy and flickerySounds reasonable to me, I don't see why it would be jaggy and flickery.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

Similar Messages

  • Smooth animation

    hi there,
    trying to achieve smooth animation, or graphics moving on screen without flickering blinking.
    I checked some code samples here on Sun website and tried to use that technique to paint into off-screen image first and then just draw image on screen. I finished with something like this:
    BufferedImage Sce;
    public Graphics2D createGraphics2D(int w, int h) {
            Graphics2D g2 = null;
            if ( Sce == null || Sce.getWidth() != w || Sce.getHeight() != h ) {
                Sce = (BufferedImage) createImage(w,h);
            g2 = Sce.createGraphics();
            g2.setBackground(getBackground());
            g2.clearRect(0,0,w,h);
          g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
            return g2;
        public void somethingToDraw(Graphics2D a) {
                  //bit of my code to draw shapes
        public void paint(Graphics g) {
            Dimension d = getSize();
            Graphics2D a = createGraphics2D(d.width, d.height);
            somethingToDraw(a);
            a.dispose();
            if ( Sce != null ) {
                g.drawImage(Sce, 0, 0, this);
    }I think i copied almost everything as it was in the original sample, but it is flickering even more than in direct drawing. maybe i do mistake somewhere.
    actually, scene is redrawn by method repaint(); which is called either in thread or on defined event.
    should I refresh screen by repaint() or something else?

    re-parent my drawing object to JPanel
    Since Swing is double-buffered you can usually eliminate the offscreen (Sce) buffer.
    I have not found any difference in flicker between Applet and application. AWT in either
    form can have problems with flicker; (well-written) Swing does not. The main difference
    between applets and applications is how you deal with applet/app context for
    initialization/startup for things like loading images and calling start methods. It always
    seems to take some tinkering to get things to work the way you want.
    Here are a couple of suggestions for reducing flicker in AWT.
    //  <applet code="AnimationTest" width="400" height="400"></applet>
    //  ues: >appletviewer AnimationTest.java
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    public class AnimationTest extends Applet {
        Controller controller;
        public void init() {
            AnimationPanel ap = new AnimationPanel();
            controller = new Controller(ap);
            setLayout(new BorderLayout());
            add(ap);
        public void start() {
            controller.start();
        public void stop() {
            controller.stop();
        private static WindowListener closer = new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
        public static void main(String[] args) {
            Applet applet = new AnimationTest();
            Frame f = new Frame();
            f.addWindowListener(closer);
            f.add(applet);
            f.setSize(400,400);
            f.setLocation(200,200);
            applet.init();
            f.setVisible(true);
            applet.start();
    class AnimationPanel extends Canvas {
        BufferedImage image;
        Ellipse2D.Double ball;
        double radius;
        double theta;
        double thetaInc;
        public void paint(Graphics g) {
            if(image == null)
                initImage();
            g.drawImage(image, 0, 0, this);
         * omitting the call to super.update below avoids
         * clearing and repainting the whole background
         * with each call to repaint -> one way to reduce flicker
        public void update(Graphics g) {
            paint(g);
        public void advance() {
            // make certain image has been initialized
            if(image == null)
                return;
            // reposition the ball
            int w = getWidth();
            int h = getHeight();
            theta += thetaInc;
            ball.x = w/2 + radius*Math.cos(theta);
            ball.y = h/2 + radius*Math.sin(theta);
            // update image
            Graphics2D g2 = image.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.white);
            g2.fillRect(0,0,w,h);
            g2.setPaint(Color.red);
            g2.fill(ball);
            g2.dispose();
            // repaint only the section that is changing
            // another way to reduce flicker
            repaint((int)ball.x-15, (int)ball.y-15, (int)ball.x+15, (int)ball.y+15);
        private void initImage() {
            int w = getWidth();
            int h = getHeight();
            radius = Math.min(w, h)/4.0;
            theta = 0;
            thetaInc = Math.toRadians(1);
            double x = w/2 + radius*Math.cos(theta);
            double y = h/2 + radius*Math.sin(theta);
            ball = new Ellipse2D.Double(x, y, 15, 15); // diameter = 15
            image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                    //getCompatibleImage(w, h);
            //System.out.printf("image = %s%n", image);
            Graphics2D g2 = image.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.white);
            g2.fillRect(0,0,w,h);
            g2.setPaint(Color.red);
            g2.fill(ball);
            g2.dispose();
         * some operating systems do better with a compatible image
         * check the type of the BufferedImage returned by this method
         * most likely not be a factor in flicker-reduction
        private BufferedImage getCompatibleImage(int w, int h) {
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            BufferedImage bestImage = gc.createCompatibleImage(w, h);
            return bestImage;
    class Controller implements Runnable {
        AnimationPanel animationPanel;
        Thread thread;
        boolean animate;
        public Controller(AnimationPanel ap) {
            animationPanel = ap;
            animate = false;
        public void start() {
            if(!animate) {
                animate = true;
                thread = new Thread(this);
                thread.start();
        public void stop() {
            animate = false;
            thread.interrupt();
            thread = null;
        public void run() {
            while(animate) {
                try {
                    Thread.sleep(40);
                } catch(InterruptedException ie) {
                    System.out.println("Controller interrupted");
                    stop();
                animationPanel.advance();
    }

  • Dynamic resizing in JDialog using setSize not working properly on solaris

    can anyone help..
    Dynamic resizing in JDialog using setSize is not working properly on solaris, its work fine on windows.
    i have set Jdialog size to setSize(768,364),
    when i dynamically resizing it to setSize(768,575); it doesn't get change but when i move dialog using mouse it gets refreshed.
    this problem is only happening on solaris not on windows.

    Hi,
    It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
    Cheers, Mathias

  • Problem resizing the JDialog???

    hi,
    I have a JDialog to which I am adding a JTable and JButton to search.
    Based on search condition the table gets populated.
    Problem here is
    I give search condition 1 and puplate the table after that I resize the JDialog
    Now i again serach it.Now the JDialog's size goes to the previous thing it does'nt take the resized size.
    in the end of my seacrh action listner I am doing
    this.pack();
    this.setVisible(true);
    this.setResizable(true);While running in debug mode I noticed once it execute this.pack();
    the resizing is gone.but if I remove this.pack() the JTable is not shown...
    Any idea about this problem??
    thnx
    neel

    The pack() method lays it out according to the preferred size of the content.
    You need to either only pack it when you first create it, or note the actual size before packing and if it's non-null and non-zero then restore it after packing.

  • Smoother animation - Please help...

    Hi,
    I'm writing a graphical editor where multiple shapes can be moved , resized and so on.
    Let's say I want to move around a rectangular Shape.
    *What is the best way to avoid redrawing all the elements of the screen - just the ones that get "dirty" by the Shape's movement??? If I keep all the Shapes in a Vector , then test which Shapes intersect with the moving box and only redraw those - would that be a fast or a slow thing to do???
    *Is there any way to take a "screenshot" of the shapes that stay foot so that I least I won't have to regenerate all the shapes to be drawn , just "paste" this screenshot then draw above it the box in its new position??? ( I mean something like copyArea(x,y,width,height, 0 , 0 )
    * If the above makes sence , can I have multiple layers - like the first for the background , the second for the "bottom" objects and so on - then sort of
    super-compose one in top of the other???
    Please give me detailed solutions (with some code if possible ) It ' s not like I have no idea how to do it , I just want to know how to get things faster...
    Thanks!!!

    When you repaint a shape, user repaint(myShape.getBounds()). In the paint-method, use these bounds to draw a subimage off a BufferedImage. Oh, and before drawing the subimage, do this:
    Vector myShapes = ...;
    for(int i = 0; i < myShapes.size(); i++) {
    if(((Shape)myShapes.elementAt(i)).getBounds().intersects(myRectangle))
    ((Graphics2D).fill(((Shape)myShapes.elementAt(i));
    myShapes = a Vector containing all the shapes.
    myRectangle = the the bounds of the shape in need of repaint.
    Now this is as optimized as it gets: It paints a small part of the screen, it paints only the shapes needed, and it only paints a small part of the BufferedImage. If you need movement, though, you might have to work a bit on this.
    Nille

  • Graphics2D and AffineTransform needs object-reuse for smooth animation!

    Hi,
    I'm currently working on a graphical framework for animation using Java2D but has come to a dead end. The goal of the framework is to deliver smooth animation on various platforms, but this seems impossible due to the following fact:
    I have a tree of graphical objects i render on a Graphics2D-object. Some of the objects to be rendered are transforms on the Graphics2D instead of visible objects - this way I can have transform-objects in my tree which will affect all child-objects. This is all very nice, but when doing transformations on the Graphics2D A LOT of objects are being created by the implementation of Graphics2D (SunGraphics2D). I've designed my framework to utilize object-reuse and cacheing-mechanisms to ensure no garbage collection is performed when actual animation is in progress - if gc's are performed, this results in visible pauses in the animation. Now, I would like to ask if someone knows how to get around this problem, or suggest I simply abandon Java2D?
    The details of my problem is the following:
    When doing transforms on the Graphics2D-object which is passed to every object in the tree (and hence, a lot of transformations are being done), a lot of FontInfo-objects are being created - even though I don't use any of them - it's all in the subsystem. The source in the SunGraphics2D is as follows:
    // this is called by my framework to rotate all childs in the tree
    public void rotate(double d) {
      transform.rotate(d);
      invalidateTransform(); // the evil starts here
    // this is called a lot of places in SunGraphics2D
    protected void invalidateTransform() {
      // a lot is thigs are going on in this method - cutted out...
      // before this method returns, the following takes place
      fontInfo = checkFontInfo(null, font); // now we are getting there
    // this is the method of pure evil object allocations
    public FontInfo checkFontInfo(FontInfo fontinfo, Font font1) {
      // every time this method is called, a FontInfo-object is allocated
      FontInfo fontinfo1 = new FontInfo();
      // and a lot of other objects are being created as well...
    }I have come to think, that Java2D is pretty old and should be pretty mature at this point, but now I doubt it since object-reuse is a pretty obvious way of doing optimizations.
    Has any of you experienced the same problem or maybe found a solution to doing transformations on a Graphics2D-object without a ton of objects being created?
    If you would like to have a look at the problem you can do the following:
    Make yourself a little program which is doing some transforms on a Graphics2D-object in a loop (to emulate the 25fps animation and the transform-objects in the tree). Now use your favorite memory profiler (I use JProbe Memory Profiler, free evaluation) and see for yourself - the objects which are garbage collected includes a ton of FontInfo-objects and many AffineTransform-objects.
    If I do not find any solution to this problem, I'm forced to face the fact, that Java2D is not suitable for animation-purposes - gc's during animation is no solution!
    Thank you for your time - hope to hear from you soon.
    Regards,
    // x-otic.

    I think the main point is java transform objects are to slow to use in animations. They definitly have there uses, but for fast animations you need something more optimized.
    If you assume a general graphic objects has getHeight, width, x, y, render(). You could do translations using these general properties at an abstract level, letting each graphic object implements its own way to render itself and use the properties.
    I tryed to make sense!

  • Detecting Resizing of JDialog

    Hey all,
    I have a JComponent added to a JDialog that is the size of the JDialog in question. When I resize my JDialog by dragging around the edge of the JDialog window, I want my JComponent to be resized DURING the resizing of the JDialog. Currently, it seems to be that when the resizing is done, my Layout Manager(FlowLayout by default right?) resizes my JComponent for me AFTER the event. Is there anyway to resize the component DURING the resizing of the JDialog? Resize Event listeners under the ComponentListener(componentResized) does not work, it only detects resizing at the end of the event, like I said, I am looking for something that works DURING the event!
    Any and all help is appreciated!
    Rob

    I tried to do this before and I would recommend against it. The resize events are posted to the end of the thread queue. I think in order to do this you would have to muck around with the base class. Ugly stuff. If possible I would try to rework the design so you don't need to do this.

  • Animated gif resizing problem

    Im trying to achieve the following: showing an animated gif that resizes to fill the area of a canvas. I tried the easy way: adding a label and setting the icon for that label, but when trying to resize the image it doesnt show (see code below). Is there any particular way of resizing an animated gif? can the labe-icon approach be used with animated gif that must be resized?
    Thanks a lot in advance.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Image;
    import javax.swing.ImageIcon;
    public class TestFrame extends javax.swing.JFrame {
    /** Creates new form TestFrame */
    public TestFrame() {
    initComponents();
    Image image = this.getToolkit().getImage("C:\\multivideo\\img\\39.gif");
    Dimension dim = jLabel1.getPreferredSize();
    image = image.getScaledInstance(dim.width, dim.height, Image.SCALE_SMOOTH);
    ImageIcon i = new ImageIcon(image);
    jLabel1.setIcon(i);
    jLabel1.setBackground(Color.BLUE);
    pack();
    /** This method is called from within the constructor to
    * initialize the form.
    private void initComponents()
    jLabel1 = new javax.swing.JLabel();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setIcon(new javax.swing.ImageIcon("C:\\multivideo\\img\\40.gif"));
    jLabel1.setMaximumSize(new java.awt.Dimension(1436, 86));
    jLabel1.setMinimumSize(new java.awt.Dimension(1436, 86));
    jLabel1.setPreferredSize(new java.awt.Dimension(1436, 86));
    getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);
    pack();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new TestFrame().setVisible(true);
    private javax.swing.JLabel jLabel1;
    }

    I don't think getScaledInstance is smart enough to return a scaled image.
    You could try doing your own scaling:
    import java.awt.*;
    import java.awt.geom.*;
    import java.net.*;
    import javax.swing.*;
    public class Animated extends JComponent {
        private Image image;
        private double scale;
        public Animated(URL url, double scale) {
            image = new ImageIcon(url).getImage();
            this.scale = scale;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Insets insets = getInsets();
            Graphics2D g2 = (Graphics2D) g.create();
            g2.translate(insets.left, insets.top);
            g2.scale(scale, scale);
            g2.drawImage(image, 0, 0, this);
            g2.dispose();
        public Dimension getPreferredSize() {
            Insets insets = getInsets();
            int w = insets.left + insets.right + (int)(scale*image.getWidth(null));
            int h = insets.top + insets.bottom + (int)(scale*image.getHeight(null));
            return new Dimension(w,h);
        public static void main(String[] args) throws MalformedURLException {
            URL url = new URL("http://members.aol.com/royalef/sunglass.gif");
            final JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new Animated(url, 2), BorderLayout.NORTH);
            f.getContentPane().add(new Animated(url, 1), BorderLayout.SOUTH);
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }Or you could explicitly extract the images from the animated gif and
    resize them individually. The sample code here does the extraction:
    http://forum.java.sun.com/thread.jspa?forumID=20&threadID=500348

  • Need suggestion to display smooth animation

    Hi.
    Recently i am doing a project for a simple game and in the game
    a imageicon must move from one Point to another Point smoothly by itself.
    To make such movement, i used swing.Timer class with repaint method and
    it works ok, but one thing keeps bothering me. The movement is not smooth.
    it's just like watching low frame rate animation(well, i guess it is low frame rate
    animation). I even set to perform a movement per 1 millisecond, which is the
    fastest delay that can be set for the swing.timer class.
    this is the only idea that i can figure out.
    If you have any good idea to make the soomth movement, please
    share with me.

    Look into Double Buffering. You basically render an image to an off-screen buffer and then draw the image to the screen while redrawing to another off-screen. As you redraw you move the image slightly.
    This is a common animation technique. If you search these forums on animation you'll get lots of information.
    Cheers
    DB

  • Smooth animation in Flash CS5.5??

    I've been workin in Flash for some years now and I've animated a lot of elements during these years.
    But now I seem to have a problem getting my stuff to animate in a smooth way (it hasn't been a problem before).
    I've created a car (cartoonstyle) entirely i Flash - vectorbased - and I want it do move across the screen.
    The problem is that it animate in a non-smooth way (it seem to get "chopped" - like the frames just "jump" from one frame to the next).
    I've tried to change the FPS (I've tried 12, 15, 16, 20, 24, 25, 29 and 30 (and also 29,97)) but with no luck.
    The idea is to have the car to drive in to an autoshop, so the speed of the car shouldn't be too fast...
    I'm workin on a short animation and the screen is 1920x1080.
    As I mentioned I have been working with Flash for some years, but either I'm overworked (believe me, that DOES happen to the most of us at some point... and very often at times I guess ..) or there's something that I've totally missed out on (because of Alzheimer, etc.).
    I've uploaded the swf-fil for you to take a look at: http://mediacom-design.no/flashStuff/MiniMorris.swf
    Any one have any ideas about this??
    Thanks for all help!!

    Ah, the age old video issue. What you consider smooth is greatly affected by a lot of factors.
    24FPS modern video is not allowed to pan a camera too fast. The human eye will notice the frame jumping too far for 24fps to make it look 'smooth'. The only way to move the same distance and keep it smooth is increase the FPS or make the movement lesser.
    You can do up to 4 things to help you out, one is just a 'chance'. From easiest to potentially least successful:
    1. Increase framerate to 60. That means the car moves less pixels per update and will "look" smoother.
    2. Increase time. Move the vehicle slower over a longer time doing the same exact thing as #1, and even the opposite can work (move it insanely fast while easing it out so the user doesn't "notice" the bog)
    3. Add in blur (a X-axis blur may help a bit, I'm skeptical).
    4. At 30fps (minimum) it may be choaking your machine on too many hefty "MovieClips". You can lighten the load of flash so it doesn't need to render the vectors in 2 ways
       note: both of these can be done at the same time
       a) Go in the library and for every part of the car check the linkage for actionscript and change the base class of the clip from flash.display.MovieClip to flash.display.Sprite on anything without animation
       b) Set cacheAsBitmap on any part of the car that does not rotate, scale or change opacity (it can move though)
    If you cacheAsBitmap, set your fps to 60 and slow down your overall movement, I'm sure it will get silky smooth.
    Designers can keel over at #4 so here's a super uber quick pic to help visually:
    #1 double click a library item to get symbol properties and check export for actionscript
    #2 is enabled now, change MovieClip to Sprite (lot less computational overhead)
    #3 shows you the color of the clip turns green (it's a Sprite!)
    #4 has an INSTANCE of this clip on stage selected and is looking at the properties of it and shows you where the dropdown position for cacheAsBitmap is.

  • Resize canvas without moving/resizing items

    i'd like to resize the canvas of the page without moving or resizing any of the items within it. i tried file>document setup but it moves stuff around. i just want to trim a couple pixels off the top and bottom. in illustrator there's the canvas resize tool and in photoshop you can do it through a menu. how do you do it in indesign?
    thanks.

    Ah, no easy way to do it.  You can try turning on Layout Adjustment (Layout > Layout Adjustment) then with nothing selected changing the proxy in this thing:
    I can never remember it's name...
    However I doubt any of the above things will work like you want them to, they're not very intuitive either.

  • JLabel needs resizing in JDialog

    I have a subclass of JDialog that shows messages to the user, kind of like JOptionPane, but with a bit more processing for my own purposes. I have a JLabel in the dialog that I set the message text on. The message is almost always HTML with some formatting, and frequently the text causes the size of the label to be higher than it was when laid out in NetBeans. If I just show the dialog that way, the label will adjust it's height but will push items below it (like my MMButtons) off the bottom of the dialog. The code calls pack() and validate() immediately before setVisible(true).
    If I use a SwingWorker to schedule another pack() and validate() 500ms after showing the dialog, then that pack/validate cause the dialog to resize as it needs to.
    Note: the text is set on the JLabel after the entire dialog has been created and layed out.
    Question: how can I get the dialog to resize properly the first time it shows, so that there is not a delay before the full contents will show?
    I'm using GroupLayout in my dialog. The layout code is shown below.
    <pre>
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(pnlButtons, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
    .addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
    .addComponent(txtText, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE))
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(txtText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(pnlButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
    </pre>

    Why? Because the { code } tag was not documented in the help box on the right side, nor is there a button for it in the tool bar.
    Anyway, here is the layout code again:
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
          layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addComponent(pnlButtons, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
              .addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
              .addComponent(txtText, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE))
            .addContainerGap())
        layout.setVerticalGroup(
          layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(txtText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(pnlButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addContainerGap())
        );

  • Combine multiple animations/moving a motion tween path location

    I have three similar animations that are stalling on preload as it's referencing the data from dropbox. We thought that it might be faster if it loaded only once, so I am now trying to combine the animations into a single scene. I'm having trouble copying and pasting the animation. I'm not quite sure where the problem originates from. I did, originally, successfully reproduce the animation and apply it to the separate elements when making them on separate stages, but now I see one of the elements (I'll call it GREEN) has a motion tween, and I'm not sure why the others (ORANGE and BLUE) are set to X, Y motion. I specifically recall having created them via motion tween, but at least they are still moving the way I created them to.
    When I copy and paste > All, GREEN (with its motion tween) is placed on the stage at X=45 coordinate, and i need the whole path to be moved over to X=643. When I drag, it only affects the current location, plus there are a couple of "points" on the line that don't have keyframes associated with them, so it has been nerving to try and set them this way. Is there a way to do this?
    Thanks

    No problem!
    So do you notice how your blueballoonCopy has those chevron marks on the timeline? That's an indication of duration in a container such as a symbol or audio element. In your case, it's a total 30 sec. of transitions, and it's a symbol. When you want to loop things differently, they should be in their own timelines, i.e. in their own symbols.
    You should do two things to get this set up:
    Convert blueballoonCopy and GREEN_KIDS_BALLOONCopy3 into a single symbol, since they will both loop endlessly from the loopGrn label to the end. Put the playhead over the loopGrn label, then select it and the trigger at the end and cut them (Edit > Cut), and then double-click on the symbol on Stage to edit it and with the playhead at the same place, paste the label and trigger. You should now have the label at 26 sec., and the trigger at the end of the timeline. Navigate back to the Stage timeline, and these two elements will now loop endlessly in the brower.
    Now convert your orange_balloon element into a symbol - that will put all of its animation inside the symbol. If you want the entire animation loop twice, add a single play action to the end of the chevron (duration indicator). If you want only a part of it to loop, use a single play from action instead, and enter the timecode or label to which you want to loop back.
    And now you'll have those two elements looping continuously, and the orange_balloon symbol looping just once.
    hth,
    Joe

  • Transparency frame of moving, resizing clip in 6.5

    In Premiere 6.5, I'm trying to move and resize a transparent clip.  That works, however, the result only shows the background that is that size of the resized clip area.  That is, the frame of the clip (the green screen area, that is chroma'd into transparency) becomes the only part of the composite that I can see.  The clip moves and shrinks, and the viewable area of the background moves and shrinks along with it.
    I can make the frame of the clip huge, so that as it shrinks it always includes the background, however, this seems like a kludge, and requires specially sizing the part of the clip that I want to show.
    How might I more effectively move and resize a clip without it effectively "matte-ing" out the background?
    Any help with this would be appreciated.
    Thanks!

    Let me try another explanation, on a hypothetical example (similar to my real project)
    Say I've got a picture of a sidewalk as the background.
    I've got a picture of a ball as the foreground.
    I put the picture of the ball on a "green screen"
    I put the ball on Video Track 2, the sidewalk on Video Track 1
    In the Transparency Effect for the ball, I select chroma, and select the green backcolor
    In the Motion effect for the ball, I have it move from top to bottom, and as it moves down, it decresases in size by 50%.
    The problem is that as that as the frame for the ball shrinks, the view "thru the now-transparent green screen" also shrinks...I only see the part of the sidewalk behind the shrinking ball frame.
    I've looked at (have the trial, but not fully investigated) Elements 8, and it looks like it's Premiere 6.5 repackaged with a (pardon me) eye-punishing format, a dumbed down (and thus harder to use) GUI, and a mass market price.
    So, I'm assuming if there's a way to beat this problem in Elements, it can be done the same way in 6.5
    Thanks again for attention to this.  I'd like to clarify that at this point it is somewhat academic, because I'm probably going to be able generate all my animations outside Premiere and import then as individual frames.  Works slick!  However it would be nice to know how to do the above, in case it's needed.

  • Can Edge animation scale/resize like Flash and Canvas

    One of our biggest concern right now is animation made with Adobe Edge can't scale and resize like Flash or Canvas (and we are not talking about fluid or responsive design) Is that true? Our animations need to allow user zoom in or zoom out without any restrictions, can we build our animation with Adobe Edge?
    Thanks

    The best solution I've found is to override the width of your stage div in CSS to auto!important. Then, use media queries to resize your div, using the CSS zoom property (and scale transform for Firefox).
    /*  Example CSS for an Edge stage div of 800px width  */
    #MY-EDGE-STAGE-DIV{width:auto!important;max-width:800px;}
    @media screen and (min-width: 1px) and (max-width: 480px)
              #MY-EDGE-STAGE-DIV{zoom:0.5;-moz-transform: scale(0.5);}
    @media screen and (min-width: 481px) and (max-width: 600px)
              #MY-EDGE-STAGE-DIV{zoom:0.6;-moz-transform: scale(0.6);}
    @media screen and (min-width: 601px) and (max-width: 800px)
              #MY-EDGE-STAGE-DIV{zoom:0.8;-moz-transform: scale(0.8);}
    @media screen and (min-width: 801px) and (max-width: 50000px)
              #MY-EDGE-STAGE-DIV{zoom:1;-moz-transform: scale(1);}

Maybe you are looking for

  • How does one set up a file sharing password?

    Hi, My wife and I use the same Airport Extreme station to access the Internet and each other's machine. Every time one of us wants to connect to the other machine via AFP, a dialog box springs up that has radio buttons, giving the choice of 'Register

  • Add Row Button Submits

    I'm using a tabular form in a region on a larger form as an option to enter lines associated with the main form. Each time I hit the ADD ROW button it submits the page and thereby increments my PK for the main form. I may be shooting myself in the fo

  • Can I loadOSX TO A MACBOOK 13?

    My mum wants to use iplayer on her Macbook 13. She was told to increase the RAM by 2Gb. She did that and I have an installation disc for OSX from my imac. When I load the install DVD or the Application install DVD it says that Snow Leopard cannot be

  • How can I get a copy of my reciept for my Macbookpro I brought from Apple in 2011?

    I need a copy of my receipt for my MacBookpro.  It's insured with my college, and I still have the mac (broken) but I still has the serial number.  Is there a way to get a copy of the receipt and how?

  • Error message when exporting to qt, Please Help!!

    I am getting file I/O error message when trying to export a 52 minute wedding project to quicktime. I tried different quictime settings, but nothing helps. Please hep me out with this issue it is driving me crazy. Thanks