Who knows how to make the frame open broader from the very beginning

Hello people,
now my code is working correctly, but the only problem, every time i start the progrm the window is minimum and each time i need to mke it full opened, How to do this?
Thank you in advance
Galina
Here is my code:import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.lang.*;
public class AnimatorApplicationTimer extends JFrame implements ActionListener
int frameNumber=-1;
Timer timer;
boolean frozen=false;
JLabel label;
ImageIcon icon;
AnimatorApplicationTimer(int fps, String windowTitle){
super(windowTitle);
int delay=(fps>0) ? (1000/fps):2000;
timer=new Timer(delay, this);
timer.setInitialDelay(0);
timer.setCoalesce(true);
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e){
System.exit(0);
label=new JLabel("Frame ", JLabel.CENTER);
//icon=new ImageIcon[2];
//label.setIcon(icon);
label.addMouseListener(new MouseAdapter(){
public void mousePressed(MouseEvent e){
if(frozen) {
frozen=false;
startAnimation();
else {
frozen=true;
stopAnimation();
getContentPane().add(label, BorderLayout.CENTER);
public void startAnimation(){
if(frozen) {
else {
if(!timer.isRunning()) {
timer.start();
public void stopAnimation() {
if(timer.isRunning()) {
timer.stop();
public void actionPerformed(ActionEvent e)
frameNumber++;
if(frameNumber<3) icon= new ImageIcon("H:/newJava/bin/T"+frameNumber+".jpeg");
else
icon=new ImageIcon("H:/newJava/bin/T0.jpeg");
//label.setText("Frame"+ frameNumber);
label.setIcon(icon);
public static void main(String args[])
AnimatorApplicationTimer animator=null;
int fps=-1;
if(args.length>0) {
try {
fps=Integer.parseInt(args[0]);
catch (Exception e) {};
animator=new AnimatorApplicationTimer(fps, "Animation with Timer");
animator.pack();
animator.setVisible(true);
animator.startAnimation();
//catch (Exception e){}

in main after setVisible call animator.setSize(width,height)

Similar Messages

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • HT201270 MORNING COMMUNITY, anyone know how to make the i4s forget a network - when the device won't give you that option?

    MORNING COMMUNITY, anyone know how to make the i4s forget a network - when the device won't give you that option?

    if you dont have the options to forget network you can reset your network settings, but than the device forget all networks
    settings > general > reset > reset network settings

  • Why can't Apple and HP get Mountain Lion 10.8.4 to work with the HP OfficeJet 7610?  Does anyone know how to make the wireless scanning work?

    Does anyone know how to make the HP OfficeJet 7610 (latest version) and iMac 3.4 GHz i7 running 10.8.4 work together correctly?  Print function seems to work ok.  Just can't find the scanner in any setup.

    In System Preferences/Print & Scan is there a scan option?

  • My phone doesn't last more than two hours before the battery is dead. Any one know how to make the battery last longer? College student in need of help!

    I used to be able to go all day without charging my phone but now I have to charge it like every two hours and as a college student who also works. I go most of my day with a dead phone. Does anyone know how to make your battery last longer?

    Eight Battery Saving settings for your iPhone and iPad | MacIssues
    The Ultimate Guide to Solving iOS Battery Drain — Scotty Loveless

  • My iphone 5's lock button is broken, and i believe its on "curtain mode" siri works ect... but i dont know how to make the screen turn on again

    My iphone 5 randomly froze so i used my accesibility button to lock the scre because my lock screen button is broken. After i locked it it wouldn't turn back on. The screen is off but i can still hear notifications and Siri. I dont know how to make it work. help?

    See: https://ssl.apple.com/support/iphone5-sleepwakebutton/

  • How do I add a website to remember the password after I have been to it before? I didn't know how to make the website remember the password initially.

    I want to have firefox remember a password on some sites that I have already been to previously. When it asked me initially, I didn't know how to make it remember. Now I would like for it to remember that site. Please explain how to do this.

    If you clicked "Never" then you have created an exception that you need to remove.<br />
    Otherwise Firefox should offer to store the name and password on the next visit when you sign on.
    Remove site(s) from the Exceptions:
    * Firefox/Tools > Options > Security: Passwords: Exceptions
    *https://support.mozilla.org/kb/make-firefox-remember-usernames-and-passwords
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • Anybody knows how to make the Garmin GPSMAP 62s with the Apple computer MAC Mountain Lion OS X

    Does anybody know how to communicate the iMac with the GPS62s from Garmin? The Plugin from Garmin cannot be open by iMac.

    The Communicator plugin for web browsers ?
    if so, describe happens when you attempt to install it.

  • Is there anyone who knows how to fix the CD burning issue?

    It appears that with an upgrade to iTunes 6.02, I can't burn an audio Cd. I have read through many of the discussion comments to look for anwswers and it appears that MANY of we iTunes users are frustrated with the inability of iTunes to burn audio CD's.
    Much like everyone else, I create my playlist, and when I click on burn, itunes checks the media, acesses the playlist and then freezes. I have to cntrlaltdel to exit the program so I don't get any error message number. I do send the error message by email when prompted. I have run a diagnostic... details below.
    Microsoft Windows XP Home Edition Service Pack 2 (Build 2600)
    Seanix Technology Inc MS-6741
    iTunes 6.0.2.23
    CD Driver 2.0.4.3
    CD Driver DLL 2.0.3.2
    LowerFilters: PxHelp20 (2.0.0.0), ASAPIW2K (6.0.2.0),
    UpperFilters: GEARAspiWDM (2.0.4.3),
    Video Driver: VIA/S3G UniChromeII Graphics\SVIA/S3G UniChromeII Graphics Adapter
    IDE\DiskHDS722516VLAT20_______________________V34OA6EA, Bus Type ATA, Bus Address [0,0]
    USBSTOR\DiskIOMEGA_ZIP_100________02.U, Bus Type USB
    IDE\CdRomLITE-ONDVDRW_SOHW-1693S________________KS0A___, Bus Type ATA, Bus Address [1,0]
    Some computers need an update to the ATA or IDE bus driver, or Intel chipset. If iTunes has problems recognizing CDs or hanging or crashing while importing or burning CDs, check the support site for the manufacturer of your computer or motherboard.
    Current user is administrator.
    D: LITE-ON DVDRW SOHW-1693S, Rev KS0A
    Media in drive is blank.
    Get drive speed succeeded.
    The drive CDR speeds are: 8 16 24 32 40 48.
    The drive CDRW speeds are: 8.
    The drive DVDR speeds are: 8.
    The drive DVDRW speeds are: 8.
    Nero and WinMedia player still burn and I can rip tunes off of my CD's with iTunes so the burner is not the problem. The Cicero/Seanix websites are useless places to get answers too. Does anyone know how to get into direct contact with someone from Apple? Please help.
    Take care
    islandbrian

    iOS 7: Help with how to fix a crashing app on iPhone, iPad (Mini), and iPod Touch
    http://teachmeios.com/help-with-how-to-fix-a-crashing-app-on-iphone-ipad-mini-an d-ipod-touch/
    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Downloading Past Purchases from the iTunes Store, App Store and iBooks Store
    http://support.apple.com/kb/ht2519
    Send feedback/suggestions to Apple.
    http://www.apple.com/feedback/ipad.html
     Cheers, Tom

  • Who knows: How to divide the request.getInputStream()?

    I use a form in a web page to update files, the form code is
    <form action="/Mywork/servlet/fileupdate1" method="post" enctype="multipart/form-data">
    <p>
    Please select a file1 to upload: <input type="file" name="foo">
    </p>
    <p>
    Please select a file2 to upload:<input type="file" name="foo1">
    </p>
    <input type="submit" value="Upload File!">
    </form>
    and the "fileupdate1" servlet which the "action" in the form tag refers to will get the inputstream by
    "ServletInputStream servIn = request.getInputStream();", and create new OutputFileStream in the disk. But
    new files which the servlet stored always have some additional codes "
    -----------------------------7d419320202be
    Content-Disposition: form-data; name="foo"; filename="H:\Documents and
    Settings\administrator\desktop\ee.java"
    Content-Type: application/octet-stream
    If I updating two files, each file will has these kinds of codes and the two files only have one inputstream. I don't
    how to remove these additional codes and how to divide the stream into pieces according to the updated-file-size.
    I don't know wether I say it clearly?And
    does anyone know the reasons and can help me?
    Thank you very much.

    Use something like Jakarta Commons FileUpload to process the multipart/form-data request:
    http://jakarta.apache.org/commons/fileupload/

  • Who knows how to make Word the default when closing Apple Works documents?

    step by step if you don't mind? i've never used Apple Script. is this the solution?
    thanks and Happy New Year

    Your question about making Word "the default when closing AW documents" is a bit unclear.
    An AppleWorks document is an AppleWorks document. If you want it in Word format, you must explicitly save a copy of it as such (and also append the .doc suffix to the proposed file name).

  • Windows media is corrupt, I have QuickTime but don't know how to make the change, can you please help me?

    Hi, I am new to you and I am having problems with my Windows Media. I ran a fix it test on it and it came back saying that the player is corrupt and can not read the dll. Plus I have gotten pop-ups saying the script on the page had quit running 2 or 3 times, that's what made me check it. I have Quick Time on here, I have never used it before. How do I properly go about making the the switch? Do I delite the Windows Media? Do I need to do anything to QuickTime other than just open it? Thank you so much for your time & help.
    Terri Young

    When you say "account," do you mean your iTunes library, because your iTunes library is what is on your computer?  Your iTunes library does not have an email address.  An account that is related to iTunes is your Apple ID (which is an email address) and you use it as your user name to sign in to the iTunes Store, to make purchases.  Changing your Apple ID will not make songs disappear from your computer's iTunes library.
    If you had an Apple ID and used it to make song purchases from the iTunes Store, and then started using a different Apple ID, you should be able to re-download the songs purchased with the old Apple ID.  In iTunes, sign in to the iTunes Store using your OLD Apple ID (and password).  That may not be your current email address, but Apple uses it as your user name, so it does not matter.
    On the iTunes Store Home screen, click on Purchased under QUICK LINKS.  This takes you do the Purchased screen, where you can re-download previous song purchases (for that Apple ID) at no cost. 
    NOTE:  If those song purchases are from more than a few years ago, you may also need to authorize your computer to play (and sync) songs for your old Apple ID. 
    For songs that were not purchased from the iTunes Store, if they are also gone, you cannot get them back unless you have a backup (or they are still loaded on your old iPod).
    If that's not what you mean by "changed the email address on my account," please post back with more details.

  • I would like to upgrade my operating system, but still have Leopard and don't know how to make the "leap" to newer software.

    I have a makbook pro, running with Leopard (10.5.8).  I know that I missed both Lion and Snow Leopard and want to know the best way to upgrade.  Do I need to buy both in addition to Mountain Lion?  Will my computer even run Mountain Lion?  I need step by step instructions because everyone I talk to just says "Just upgrade it" Thanks.

    Upgrading to Mountain Lion
    You can upgrade to Mountain Lion from Lion or directly from Snow Leopard. Mountain Lion can be downloaded from the Mac App Store for $19.99. To access the App Store you must have Snow Leopard 10.6.6 or later installed.
    If you need to purchase Snow Leopard you can still purchase a copy from Apple's online store's telesales agents.[1-800-MY-APPLE (1-800-692-7753) or Customer Service and Sales Support at 1-800-676-2775.] Ask for a Sales Representative.
    Third-party sources for Snow Leopard are:
    Snow Leopard from Amazon.com
    Snow Leopard from eBay
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store.
    If you need to purchase Lion call 1-800-692-7753 or 1-800-676-2775. Ask for a Sales Representative. They will check your Apple ID, and email you a code and instructions.  The cost is $29.99 (as it was before) plus tax.  It's a download.
    Be sure your computer meets the minimum requirements:
    Apple - OS X Mountain Lion - Read the technical specifications.
    Macs that can be upgraded to OS X Mountain Lion
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Xserve (Early 2009)
    Are my applications compatible?
    See App Compatibility Table - RoaringApps - App compatibility and feature support for OS X & iOS.
    For a complete How-To introduction from Apple see Apple - Upgrade your Mac to OS X Mountain Lion.

  • Does anyone know how to make the mouse motion just NORMAL?

    Hi folks. Alright I am a new but I love my Mac. The one thing I just can't get past is the feel of the way the mouse works. It is tooooo smooth. I feel like when i go slow with the motion, it covers less ground as I move, then when I speed up my motion, it feels more in time with the motion. I realize this is pretty hard to explain but does anyone know what i am talking about? Sure it is more precise but I really hate it. Help?

    David DeCristof:
    I have been looking for a solution to this for quite some time, and I want to personally thank you for using a little humility to recognize that no, Macs don't behave the same way as other (not just Windows) graphical user interfaces when it comes to the mouse pointer.
    I downloaded and purchased (well worth the funds for me) "USB Overdrive" and now I have a pointer that moves around the screen like I'm moving my hands around the screen. So natural this way. So thank you very much for mentioning those haxies or preference applets or whatever you want to call them.
    Now my Mac is 10 times better!!!
    As an old Amiga user, and then Windows user, it has been so disorienting to work around the desktop with Mac OS's non-customizable motion preferences. It often had left me asking myself just what part of the OS is "more friendly?" Sure, it's a rock solid OS, but friendly? C'mon.....Sheesh...You mean after I find a THIRD PARTY HAXIE to make it that way?
    Well, now I have nothing to complain about.
    By the way, my Speed setting is at 160 dpi, and the Accelertaion is set at 90%, in USB Overdrive. And this feels just right for me.
    Now if only I could make my pointer WHITE instead of BLACK, (yes I guess I'm racist...) and make it about four times bigger without making it look like a lego...
    Color this thread A N S W E R E D, baby!
    17" Mac Book Pro   Mac OS X (10.4.7)  

  • Is there someone out here that can help me with an Adobe CC question. I need to know how to make the program text larger? it is way to small.

    I need help with making the font size in the Adobe software bigger. I don't know who to do this and it is very tiny

    Sweet!  Finally another Dead Head!!!
    The short answer is have your friend burn those tracks to CDs and then import them into your iTunes library.
    For lllaass:  Its obvious you have never been to a Dead show, so we'll cut you some slack.  The tracks in question were never purchased, they were taped live during the show.  The Greatful Dead has always reserved "front row center" for a group affectionately called "tapers," because they always came prepared to record each show, and owing to the fact that no two shows were the same, some of those tapes are one of a kind.....  I have taped shows myself, namely the shows at RFK Stadium in DC, and the Coliseum in Charlotte NC.

Maybe you are looking for