Resize jdialog without flicker effect

I made a vertical tool palette with a JDialog : I have "setcontentpane" a JPanel with vertical boxlayout.
This JPanel contains other JPanels (class PaletteZone extends JPanel) that act like tool zones : they can be collapse or expand. If you want to have look of what i'm talking about, there is an image here of the palette :
http://db-maths.nuxit.net/im1.png
Here is my problem... I have a PaletteZone method used to collapse the tool zone :
public void collapse(){
        ContentVisible=false;
        ZoneTitle.title.setIcon(rightTriangle);
// component 0 is the zone title bar, component 1 an icon set (within a JPanel) :
        this.remove(1);
        JP.validate();
}******* 1) When I use JP.validate, there is no flickering at all and the zone collapse nicely. BUT the JDialog isn't set to the good size. If you want to have a look on what you get when you clic on "Construction" :
http://db-maths.nuxit.net/im2.png
******* 2) If I use JP.pack(), of course the dialog is correctly resized and redrawn. BUT there is a flickering effect : I've made some tries on JFrames and JDialogs and I saw that a pack() call clear immediatly the background and then send a paint call : this "clear/paint" sequence makes a bad flickering effect. I have a quite recent computer (G5 and OS X), and I use java 1.4.2 so I don't think the fact that I see this flicker is caused by hardware or software...
******* 3) If I use JP.setSize(), things behave exactly like if I do a pack() call...
Do you know what I could do to avoid this flicker ? to set the size to the JDialog without this "clear/paint" sequence ?

you will have to create a jpanel and place this in the dialog's NORTH.
add a mouseListener to the panel and provide your own moving-handling.
this.setLocation((int) (this.getX() + e.getX() - m_iOffset.getX()) ...
this.repaint();you'll have to set m_iOffset wehen mousePressend, and call the moving method when mouseDragged.

Similar Messages

  • How to remove flicker effect from screens / projections?

    Hey,
    I wondered if there's an option within Premiere Pro CC ( or AE) to remove flicker effects from screens and projections. I attached a jpg as an example of such a projection. Here is an anti flicker option in Premiere Pro, but it doesn't seem to have an effect on my problem.
    Cheers

    You need to shoot scenes like that using a camera that allows Synchro-Scan, which can adjust the cameras scanning rate to that of the display in the shot.  Any mismatch between camera and siaplay is what causes the flicker, and Synchro-Scan is the only way to correct it without entirely removing the screen from teh shot and replacing it with another, usually via After Effects.

  • Creating photo slideshow in imovie without any effects

    Hi, When I am trying to make a photo slide-show video in imovie, every photo comes with zoom-in and out effect. I dont like that one. I just want to show photos one after another without any effect. But I couldnt find any option in imovie. Is it possible to make one?
    Please give me suggestions. Thanks in advance!
    Jay

    Click on the small icon at the top center of any photo in iMovie. You will see the options Fit, Crop, Ken burns, Done. I think you will like the Ken Burns effect after you experiment with it a bit. If you want just plain photos, click Fit and Done.
    Good luck.

  • Adobe Media Encoder (Pr CS4) encodes my videos without the effects of the plugins Genarts Sapp

    Hello,
    My Adobe Media Encoder (Premiere CS4) encodes my videos without the effects of the plugins Genarts Sapphire. I did not have this problem with CS2 and also he encodes all other plugins.
    Do you know why? I really need to solve this serious issue.
    Any help will be apprecieted,

    OK, good. Go to C:\Users\username\AppData\Roaming\Adobe\Premiere Pro\4.0 and look for two files called "Plugin Loading.log" and "Headless Plugin Loading.log" (without the quotes). These are just text documents, so open them up in Notepad or similar and compare the two; what you're looking for are references to your Sapphire plugins. What you'll probably find is that in "Plugin Loading.log", the plugins are loaded successfully--it will say something like "The plugin was successfully loaded from the registry."--whereas in "Headless Plugin Loading.log" the same plugin will be marked "The plugin is marked as Ignore, so it will not be loaded."
    If you see that, let me know and I'll try to walk you through the steps of correcting it. If you like, I'd be happy to look at the log files; attach them to a reply here (they're small documents).

  • My plugins (inserts) are showing a strike-through them and all get is a track without any effects on it. How do restore the remove the strike-through of the plugin?

    I completed a projected which I saved and closed. Afterward I reopened it to make some changes but found that all the plugins (inserts) in all the tracks had strike-through signs on them and when i tried to play the project all I got was sound without any effects. How can I fix this issue?

    That would indicate that the plugin or plugins in question.. are no longer available... for some reason..
    Did you change Logic's start up mode from 32 to 64 bit after you last saved that song? (and the plugins you were using were 32bit only versions)
    Have you checked the AU Plugin Manager to make sure those plugins are still available?
    Were the plugins used,  demo versions that have now expired or become disabled for whatever reason?

  • Music Video Flicker Effect

    I would like to add a Flicker or Twitch Effect to my music videos, it looks like ( 1 ) still image (possibly) or (1 ) video image flickering or flashing overtop another image real fast any thoughts. If i need a plug-in any suggestions would be great.  I am using Final Cut Pro X

    If I understand your question correctly, just simply cut back and forth between the images you want to use for the Strobe/Flicker effect. Cut the video/image down to just a few frames or so, depends on how fast you want it.

  • When playback progressive video in FCP X it will have flicker effect, how can i remove it

    when i shoot video in PAL 25p , and it will play in my imac with FCP X  this video have flicker effects and 30p will show small flicker, when i use 25i format there are no flicker effect in FCP X, in canon 7D have only progressive video (1080p) i want PAL , how i can remove this flicker effects, any method have in  FCP X
    please help me
    justin

    It is very simple. Yahoo uses Microsoft .NET FRAMEWORK Assistant to hijack your browser. Go to the upper left hand corner (Firefox 10 - it might be elsewhere on older versions) and click on the drop down arrow. On the right hand side, click on "Add-Ons", and a list will appear. Locate .NET Framework Assistant. On the right side, click on "disable" and then either click on the small line that says "restart", or simply close Firefox by clicking on the red "X" in the upper right hand corner of your screen. Reopen Firefox and -Voilà, your problem is solved. As far as I am concerned, Yahoo has created a virus when they hijack your preferred browser - a good reason to dump Yahoo for any other use. On the other hand, Microsoft is not innocent in this endeavor. If you want to get rid of the real problem. Dump windows and switch to '''Ubuntu''' Linux. You can find it '''free''' on the internet.

  • How can I transfer my photo taken with iPhone5 filters maintaining filter effects ? I always have colored photo without filter effect on my iMac !!!

    How can I transfer my photo taken with iPhone5 filters maintaining filter effects ? I always have colored photo without filter effect on my iMac !!!

    no completely satisfactory answer but you can :
    1) email photos to yourself (tedious if you have a lot of filtered)
    2) create shared file in iPhone and bring into iPhoto (and maybe Aperture - not tested yet) with filter effects
    3) import to iPhoto and add effects from there (likely needs latest version to mirror iPhone filter)
    see this thread for more explanation on these workarounds: iPhone isn't transferring photos taken with built-in filters

  • Resize partitions without erasing existing data

    I have one drive (internal), dual partition (OS X 10.5.2 and Vista) and I want to split the volume OS X 10.5.2 in two. I try this using Disk Utility, but one warning was showed: ..changing the partition map may make this disk unbootable using windows"
    Is it warning true? What do I expect to happen in case of resizing?
    If someone had have any related experience about that, I will appreciate Your advice.

    You can resize partitions without losing data but you won't be able to boot into Windows after that. That was a bad experience I had. My first bad experience was to repartition a dual-partition (Tiger+Windows) drive, ignoring the warning. Guess what? Lost everything and had to reinstall both OS.
    Mac OS X Extended (journalled) drives can be repartitioned without losing data using the "diskutil" command in the Terminal window. Type "diskutil" and you get a list of available commands.

  • I have tryed the "find my ipod application" and i tried to lock it and it have been locked but i am using the ipod without any effects but if by time would be any side effects?

    i have tryed the "find my ipod application" and i tried to lock it and it have been locked but i am using the ipod without any effects but if by time would be any side effects?

    It will be locked when you connect it to Wi-Fi

  • Resizing/stretching without effecting angles of other points in the same path?

    Hi all,
    I am wanting to increase the size of say a round edged box that I just created with the round edge rectangle tool.
    Now when I create the path initially the rounded edges are at perfect 90degree cuts. But say I wanted to increase the size of the path say by doubling its height, how I do that and still maintain the perfect 90degree corners I started with?
    Any help would be great

    The only way I know to do this is to either make the rectangle over or to use the Effect>Convert To Shape>Round Rectangle

  • How to pack() twice without flicker (and other fireworks)? (with SCCEE :)

    Hello, there is this "feature", that sometimes you have to call pack() twice to pack tightly around the subject. This has been discussed here before, some people call it a bug, camickr said he did not know why, this is just how the layout worked. OK, the problem with calling it twice, is that the user notices the window flicker.
    The flicker does not happen every time (or, better say, we do not see it every time), that's why I put the whole thing in the loop in the SCCEE.
    Even worse, this does not happen right now in my program, but in the SCCEE, there is also a boatload of exceptions (not mine), sometimes pack() even called twice does not work, and eventually, the whole loop just hangs.
    (So, by Murphy's law, these things will eventually happen in my big program too)
    Question: how do I resize a JFrame tightly around a JTextPane, without the flicker (and other special effects)? Here is the code, if you look carefully, you can tell the window momentarily went taller, before going shorter again - does not always happen, if you are lucky it will do this a few times before it hangs altogether... I do this many times in myprogram, as the user moves things around, they really notice.
    If I call setVisible(false) before the pack()s and then back to true after, then of course, the flicker is even worse.
    Thank you for any suggestion of a workaround... Mark
    import java.util.*;
    import javax.swing.*;
    public class Foobar
         public static void main(String args[])
              JFrame frame = new JFrame();
              JTextPane txt = new JTextPane();
              txt.setText("FOOBAR FOOBAR FOOBAR");
              frame.setContentPane(txt);
              frame.pack();
              frame.setVisible(true);
              while (true)
                   try
                        Thread.sleep(250);
                   catch (Exception e)
                   txt.setText("FOOBAR FOOBAR FOOBAR FOO");
                   frame.pack();
                   frame.pack();
                   try
                        Thread.sleep(250);
                   catch (Exception e)
                   txt.setText("FOOBAR FOOBAR FOOBAR");
                   frame.pack();
                   frame.pack();
    }Edited by: Mark_Galeck on Dec 16, 2008 3:02 AM

    I tidied up your program a little, and you're right - I can see the window size flicker a little. It's very pronounced with only 1 call to pack(), and less so with 2 calls to pack(), but still noticeable.
    import java.awt.event.*;
    import javax.swing.*;
    public class Foobar {
         public static void main(String args[]) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        final JFrame frame = new JFrame();
                        final JTextPane txt = new JTextPane();
                        txt.setText("FOOBAR FOOBAR FOOBAR");
                        frame.setContentPane(txt);
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        frame.pack();
                        frame.setVisible(true);
                        Timer timer = new Timer(250, new ActionListener() {
                             public void actionPerformed(ActionEvent e) {
                                  long time = System.currentTimeMillis();
                                  String text = "Time: " + time;
                                  if ((time%2)==0) {
                                       text += " longer";
                                  txt.setText(text);
                                  frame.pack();
                                  frame.pack();
                        timer.start();
    }

  • How to resize JDialog after making some fields invisible?

    Hi,
    I have many fields in a JDialog box. And I am making some of them invisible (based on some logic).
    Even though I am using invisible, the dialog size is not resized automatically.
    I can see so much space and it is not good.
    Is there any way so that I can resize this dialog?
    Regards,
    Praveen

    Praveen_Kumar_Jayaram_1985 wrote:
    But I am not using any layout manager. It is free design. Is there any way to achieve my requirement without using layout manager?But this is what layout managers are made for. Why not use the correct tool for the job? Also, please do not cross-post questions in multiple forums. This will frustrate anyone who tries to help you only to find out later that the same answer was given hours ago in a cross-posted thread. For this reason, many volunteers here and at the other sites refuse to help repeat offenders.

  • How to edit linked text in an Indesign long document without it effecting the whole document

    I want to work out how to edit text in indesign without the rest scrolling
    I have a large 200 page book.  The text was supplied in Word and I have placed the whole document automatically and now I am going through each page doing my magic with pics, stylesheets etc.
    When the client comes back with edits, I am concerned that deleted or adding in text will scroll the text to the next chapter, etc etc.  This will be a nightmare.  Not sure how to unlink say 5 pages or so that are in each chapter so I can edit easily without the whole document being effected.
    Apologies I am probably not explaining myself all that well.

    lisalip wrote:
    john the link is broken
    I can see there are scripts but I don't want each page separate rather each chapter (each chapter can go for 2 or 7 pages)
    I am only 35 pages or so into the book and if I have to I can re place the text with some work, ie start again with the text pages.
    seems sily though that I cannot split the threaded stories a few pages at a time.
    The link is now fixed.
    You can split the threaded story into separate stories anywhere in the thread. At the chapter breaks seems logical. There are many users who'll assert all sorts of right/wrong at you when it comes to threading text. For my purposes, I set up long documents much the way you propose; threading articles, stories, or chapters discreetly; rarely would I ever thread an entire long document as one. It's a preference, not a rule. Each way has benefits and pitfalls.

  • Still Images without flicker

    I am looking for the best settings to run a 3d Max walkthrough (with still images) into Premiere CS4 and then export to F4V WITHOUT such a quality loss.  I have succesfully exported to .mov and the clip looks great.  Try exporting to wmv or F4V or FLV and the file size is small and the quality sucks.  The .mov file is 119 mb, too large for client to download.  The wmv or flv or f4v look too terrible to send on.    I have tried using de-interlacing and flicker control and have had no positive results.
    Please help.
    Dave

    Welcome to the forums.
    Export at full resolution using a lossless codec and then use the free Windows Media Encoder to get the best possible WMV encoding. It has far more options than what is available in PPro.
    Cheers
    Eddie

Maybe you are looking for

  • HP drivers not working for Windows 8.1

    Hi,  I've been given this laptop and it came pre-installed with Windows 8, touch screen and every driver works fine on Windows 8 till I've upgraded it to Windows 8.1, touch screen no longer works installed the latest driver from the HP website and th

  • Help with RX1600 plz

    Hi, I just bought a new MSI RX1600 PRO and when I installed with the driver that came with it my Windows XP shows two cards in the device manager, one R530 and one R530 Secondary??!!! Also, the 3D Mark 2005 reports the core clock to be 375 when accor

  • How to save content typed in textfield only as lowercase in repository?

    How to save content typed in textfield only as lowercase in repository? Suppose we have a textfield in a component dialog. Irrespective of how enduser enters the data in the textfield, lower/mixed/upper case, it should always be saved as lowercase in

  • How To Edit Layout?

    Hi, I am very new to WebTools 2007.  Can someone give me a brief overview on how to change the layout of the various pages?  For example, can I graphically change the layout of the part detail page (partdetail.aspx) to move elements around and update

  • Keychain & certificates

    How do I stop mail from asking for a keychain password all the time? can it be switched off? Also I have three certificates that come up with a red x and "This root certificate is not trusted" could some one please explain this to me. Thanks