Please, help a newbie:  Question about animating expanding containers

Hi All,
Short Version of my Question:
I'm making a media player that needs to have an animation for panels sliding up and down and left and right, and the method I've been using to do this performs far slower than the speed I believe is possible, and required. What is a fast way to make a high performance animation for such an application?
Details:
So far, to do the animation, I've been using JSplitPanes and changing the position of the divider in a loop and calling paintImmediately or paintDirtyRegion like so:
public void animateDividerLocation( JSplitPane j, int to, int direction) {
for(int i=j.getDividerLocation(); i>=to; i-=JUMP_SIZE) {
j.setDividerLocation(i);
j.validate();
j.paintImmediately(0, 0, j.getWidth(), j.getHeight());
The validate and paintImmediately calls have been necessary to see any changes while the loop is going. I.e., if those calls are left out, the components appear to just skip right to where they were supposed to animate to, without having been animated at all.
The animation requirement is pretty simple. Basically, the application looks like it has 3 panels. One on the right, one on the left, and a toolbar at the bottom. The animation just needs to make the panels expand and contract.
Currenly, the animation only gets about, say, 4 frames a second on the 800 MHz Transmeta Crusoe processor, 114 MB Ram, Windows 2000 machine I must use (to approximate the performance of the processor I'll be using, which will run embedded Linux), even though I've taken most of the visible components out of the JPanels during the animation. I don't think this has to do with RAM reaching capacity, as the harddrive light does not light up often. Even if this were the case, the animation goes also goes slow (about 13 frames a second) on my 3 GHz P4 Windows XP if I keeps some JButtons, images etc., inside the JPanels. I get about 50 frames/sec on my 3 GHz P4, if I take most of the JButtons out, as I do for the 800 MHz processor. This is sufficient to animate the panels 400 pixels across the screen at 20 pixels per jump, but it isn't fast or smooth enough to animate across 400 pixels moving at 4 pixel jumps. I know 50 frames/sec is generally considered fast, but in this case, there is hardly anything changing on the screen (hardly any dirty pixels per new frame) and so I'd expect there to be some way to make the animation go much faster and smoother, since I've seen games and other application do much more much faster and much smoother.
I'm hoping someone can suggest a different, faster way to do the animation I require. Perhaps using the JSplitPane trick is not a good idea in terms of performance. Perhaps there are some tricks I can apply to my JSplitPane trick?
I haven't been using any fancy tricks - no double buffering, volatile images, canvas or other animation speed techniques. I haven't ever used any of those things as I'm fairly new to Swing and the 2D API. Actually I've read somewhere that Swing does double buffering without being told to, if I understood what I read. Is doing double buffering explicitly still required? And, if I do need to use double buffering or canvas or volatile images or anything else, I'm not sure how I would apply those techiniques to my problem, since I'm not animating a static image around the screen, but rather a set of containers (JSplitPanes and JPanels, mostly) and components (mostly JButtons) that often get re-adjusted or expanded as they are being animated. Do I need to get the Graphics object of the top container (would that contain the graphics objects for all the contained components?) and then double buffer, volatile image it, do the animation on a canvas, or something like that? Or what?
Thanks you SO much for any help!
Cortar
Related Issues(?) (Secondary concerns):
Although there are only three main panels, the actual number of GUI components I'm using, during the time of animation, is about 20 JPanels/JSplitPanes and 10 JButtons. Among the JPanels and the JSplitPanes, only a few JPanels are set to visible. I, for one, don't think this higher number of components is what is slowing me down, as I've tried taking out some components on my 3GHz machine and it didn't seem to affect performance much, if any. Am I wrong? Will minimizing components be among the necessary steps towards better performance?
Anyhow, the total number of JContainers that the application creates (mostly JPanels) is perhaps less than 100, and the total number of JComponents created (mostly JButtons and ImageIcons) is less than 200. The application somehow manages to use up 50 MBs RAM. Why? Without looking at the code, can anyone offer a FAQ type of answer to this?

You can comment out the lines that add buttons to the panels to see the behavior with empty panels.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.Timer;
public class DancingPanels
    static GridBagLayout gridbag = new GridBagLayout();
    static Timer timer;
    static int delay = 40;
    static int weightInc = 50;
    static boolean goLeft = false;
    public static void main(String[] args)
        final GridBagConstraints gbc = new GridBagConstraints();
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        gbc.fill = gbc.HORIZONTAL;
        final JPanel leftPanel = new JPanel(gridbag);
        leftPanel.setBackground(Color.blue);
        gbc.insets = new Insets(0,30,0,30);
        leftPanel.add(new JButton("1"), gbc);
        leftPanel.add(new JButton("2"), gbc);
        final JPanel rightPanel = new JPanel(gridbag);
        rightPanel.setBackground(Color.yellow);
        gbc.insets = new Insets(30,50,30,50);
        gbc.gridwidth = gbc.REMAINDER;
        rightPanel.add(new JButton("3"), gbc);
        rightPanel.add(new JButton("4"), gbc);
        final JPanel panel = new JPanel(gridbag);
        gbc.fill = gbc.BOTH;
        gbc.insets = new Insets(0,0,0,0);
        gbc.gridwidth = gbc.RELATIVE;
        panel.add(leftPanel, gbc);
        gbc.gridwidth = gbc.REMAINDER;
        panel.add(rightPanel, gbc);
        timer = new Timer(delay, new ActionListener()
                gbc.fill = gbc.BOTH;
                gbc.gridwidth = 1;
            public void actionPerformed(ActionEvent e)
                double[] w = cycleWeights();
                gbc.weightx = w[0];
                gridbag.setConstraints(leftPanel, gbc);
                gbc.weightx = w[1];
                gridbag.setConstraints(rightPanel, gbc);
                panel.revalidate();
                panel.repaint();
        JFrame f = new JFrame("Dancing Panels");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(panel);
        f.setSize(400,300);
        f.setLocation(200,200);
        f.setVisible(true);
        timer.start();
    private static double[] cycleWeights()
        if(goLeft)
            weightInc--;
        else
            weightInc++;
        if(weightInc > 100)
            weightInc = 100;
            goLeft = true;
        if(weightInc < 0)
            weightInc = 0;
            goLeft = false;
        double wLeft = weightInc/ 100.0;
        double wRight = (100 - weightInc)/100.0;
        return new double[]{wLeft, wRight};
}

Similar Messages

  • Pretty please help, Quick newb question...

    I have a dell axim x50. I have the jad and jar files. How can I make my application work on the PDA??
    I've simulated with toolkit, and such.
    Please Please help ><

    The act of getting the jar from a pc to the device is called "provisioning"
    Some devices let you do this over bluetooth or IR and many others only allow it over http.
    I used to use some free web midlet hosting sites but the ones i used have been shut down now. (do a search on the net for "Free Midlet Hosting")
    These days i set up a web server on my development machine and then just use the phones wap browser to download the program.

  • Please help me:one question about Assest Depreciation.

    In T-CODE ABAON I fill all of the necessary fileds and click save but the sap raise some error message like below.So in T-CODE AO90,I select chart of account->account determ->Depreciation,and input my G/L Acct 5201 in the field of 'Acc.dep. accnt.for ordinary depreciation' and save.Then I exit and go to T-CODE ABAON and try again,but the error still exist.It seems not work to what I have done in T-CODE AO90.I don't know why and how to resolve this problem.So I need your help.Thank you so much.
    error message:
    Account 'Acc.dep. accnt.for ordinary depreciation' could not be found.
    Message no. AU133
    Diagnosis
    When creating the accounting document, the system could not find account 'Acc.dep. accnt.for ordinary depreciation' for company code HJW1.
    Procedure
    Enter this account in the account determination for Asset Accounting.
    Message was edited by:
            Melody  H.

    Hi,
    Check the following:
    1. In ur asset class check the Acct determination & for this acct detr check the gl account in AO90.
    2. check ur GL accounts.
    3. Or are u making the changes in the same client or other & have u transported the request or not?
    or sometimes it is necessary to terminate the session and relogin then check.
    Regards,
    Meenakshi

  • Please help the newbie!

    I've created a photo gallery in Flash CS3 that contains 2 UI
    Loaders (one for a graphic title for the image, and one for the
    image itself) and have tested it and it works fine. I even
    published the file as an independent html file and it seems to work
    fine when tested in the browser too. My problem is that when I
    place the .swf into my html page in dreamweaver and test it, the
    file shows up, but the loader info doesn't work. The images don't
    load.
    Here is the code I have set up in Dreamweaver -
    Within the head, I have this:
    <script src="../Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    Within the body, I have this set up for where the swf gallery
    is supposed to be:
    <div id="content_main">
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','911','height','540','title','Photo
    Gallery','movie','../flash/photography2','quality','high','loop','false','play','false'
    ); //end AC code
    </script><noscript><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
    width="911" height="540" title="Photo Gallery">
    <param name="movie" value="../flash/photography2.swf"
    />
    <param name="quality" value="high" /><param
    name="LOOP" value="false" /><param name="PLAY" value="false"
    />
    </object></noscript>
    </div>
    Can anyone help? Thanks so much. I appreciate any help I can
    get.

    Two suggestions -
    1. Please help yourself by using a subject line that is
    descriptive of your
    question/issue. Can you imagine how many posts there are that
    have exactly
    this subject? Later when you want to find this thread, you
    will be deep in
    the mud of other newbie posts.
    2. When you post a question about problems with your layout,
    please always
    post a link to the uploaded page? That way we can all examine
    the page's
    behavior, look at the code, and give you a precise answer.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mjordan1965" <[email protected]> wrote in
    message
    news:[email protected]...
    > I've created a photo gallery in Flash CS3 that contains
    2 UI Loaders (one
    > for a
    > graphic title for the image, and one for the image
    itself) and have tested
    > it
    > and it works fine. I even published the file as an
    independent html file
    > and it
    > seems to work fine when tested in the browser too. My
    problem is that when
    > I
    > place the .swf into my html page in dreamweaver and test
    it, the file
    > shows up,
    > but the loader info doesn't work. The images don't load.
    >
    > Here is the code I have set up in Dreamweaver -
    >
    > Within the head, I have this:
    >
    > <script src="../Scripts/AC_RunActiveContent.js"
    > type="text/javascript"></script>
    >
    > Within the body, I have this set up for where the swf
    gallery is supposed
    > to
    > be:
    >
    > <div id="content_main">
    >
    > <script type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    >
    version=9,0,28,0','width','911','height','540','title','Photo
    >
    Gallery','movie','../flash/photography2','quality','high','loop','false','play',
    > 'false' ); //end AC code
    > </script><noscript><object
    > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    > rsion=9,0,28,0" width="911" height="540" title="Photo
    Gallery">
    > <param name="movie" value="../flash/photography2.swf"
    />
    > <param name="quality" value="high" /><param
    name="LOOP" value="false"
    > /><param name="PLAY" value="false" />
    > </object></noscript>
    >
    > </div>
    >
    > Can anyone help? Thanks so much. I appreciate any help I
    can get.
    >

  • Flash newbie questions about slow loading site

    Hi all. I am new to Flash and web-site building in general and I have been learning while doing. Its fun, but frustrating. I really need some help, hope someone out there with Flash experience can give me some advice.
    My problem is this: I built a Flash website, but it is painfully slow to load up (3-5 minutes via cable modem) when I visit the site (via Firefox, etc). Once it does load up, everything is fine with navigation. I'm having a hard time figuring out why its taking so long to load up on the web because, basically, I don't know how to trouble shoot. Hope you guys can help!
    Details: the site is just a portfolio site with pictures and a few motion-things, no complicated animations. The swf file is about 9MB. I do have a flash preloader, but it doesn't show up until after the 3-5 minute "load-up" time. When I do the testing via Flash, its Ok and doesn't show the lag. But once I upload the website files and try to visit my website, the load time problem occurs.
    My thoughts:
    - do I have to purge my Flash file/library of unused images before creating my swf file?
    - Is there a problem with my html code in my index file?
    - because it is a portfolio site, I've got about 90 images on it, each image about 300-400K.  Is this too big, or about right?
    Please help! Sorry for the long email, just desperate for help. Thanks in advance for any advise!!!! Just in case, here is the html code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Acme Company</title>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body {
    background-color: #000000;
    -->
    </style>
    <link href="favicon.ico" rel="icon" />
    </head>
    <center>
    <body>
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','800','heigh t','600','title','Acme Company','vspace','100','src','development files/company site_AS2_2008 OCT_final','loop','false','quality','high','plugin spage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgco lor','#000000','scale','exactfit','movie','develop ment files/company site_AS2_2008 OCT_final' ); //end AC code
    </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="600" vspace="100" title="Acme Company">
    <param name="movie" value="development files/comapny site_AS2_2008 OCT_final.swf" />
    <param name="quality" value="high" /><param name="BGCOLOR" value="#000000" /><param name="LOOP" value="false" /><param name="SCALE" value="exactfit" />
    <embed src="development files/company site_AS2_2008 OCT_final.swf" width="800" height="600" vspace="100" loop="false" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" scale="exactfit"></embed>
    </object></noscript>

    Yeah I'm with Ned on this one. Dynamically loading your images is the way to go. The fact that you are new to Flash, try this tutorial (http://www.entheosweb.com/Flash/loading_external_images.asp). As you move along in learning Flash, look for tutorials on actionscript arrays and loading images dynamically. Arrays allow you to call each images from a folder outside your fla. That way your site moves right along without much loading time.
    Hope I was of help,
    -Sly

  • Please help me jmf question

    Hi i want to create custom data source as i have read in different post and also on sun site
    I tried to create one one for my self,
    where am getting stream from tcp port.
    before that i test the data by using socket programming, i saved the input stream into file and played and its working fine and then i transfer that file using avtransmiter2.java and it work fine again its mean it confirm that the data i am getting from skype is working fine . now my question is how to get that input stream and instead of saving to the file i can play it using jmf player or send it on rtp session. i read different post how to create custom data source from inputstreams but have not work for me ... i modified a user code posted http://archives.java.sun.com/cgi-bin/wa?A2=ind0106&L=jmf-interest&D=0&P=25865 in that post some body recommanded to implement seekable so i implemented that one als in that code..... below is the code
    the error is
    LoadInputStream.loadBytes() - realizing player
    Exception in thread "JMF thread: com.sun.media.PlaybackEngine@8ed465[ com.sun.media.PlaybackEngine@8ed465 ] ( configureThread)" java.lang.NullPointerException
    at com.skype.sample.InputSourceStream.read(InputSourceStream.java:89)
    at com.sun.media.parser.BasicPullParser.readBytes(BasicPullParser.java:142)
    at com.sun.media.parser.BasicPullParser.readBytes(BasicPullParser.java:114)
    at com.sun.media.parser.BasicPullParser.readInt(BasicPullParser.java:191)
    at com.sun.media.parser.audio.AuParser.readHeader(AuParser.java:109)
    at com.sun.media.parser.audio.AuParser.getTracks(AuParser.java:76)
    at com.sun.media.BasicSourceModule.doRealize(BasicSourceModule.java:180)
    at com.sun.media.PlaybackEngine.doConfigure1(PlaybackEngine.java:229)
    at com.sun.media.PlaybackEngine.doConfigure(PlaybackEngine.java:193)
    at com.sun.media.ConfigureWorkThread.process(BasicController.java:1370)
    at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    i need urgent help to this matter so please help me in that i would be very thankfulll ......
    below is the code
    skype use the standard audio format
    Audio format
    File: WAV PCM
    Sockets: raw PCM samples
    16 KHz mono, 16 bit
    Note
    import javax.media.*;
    import java.io.*;
    import java.net.ServerSocket;
    import java.net.Socket;
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class LoadInputStream extends JFrame implements ControllerListener {
    private Player player;
    /** Creates new LoadInputStream */
    public LoadInputStream() {
    try{
    // declaration section:
    // declare a server socket and a client socket for the server
    // declare an input and an output stream
    ServerSocket SkypeServer = null;
    DataInputStream is;
    Socket clientSocket = null;
    try {
    SkypeServer = new ServerSocket(4447);
    catch (IOException e) {
    System.out.println(e);
    // Open input stream
    clientSocket = SkypeServer.accept();
    is = new DataInputStream(clientSocket.getInputStream());
    loadBytes(is);
    setBounds(100, 100, 300, 300);
    setVisible(true);
    catch(Exception e){
    System.out.println(e);
    /* Loads the given byte [] into the MediaPlayer and starts playing it immediately. */
    public void loadBytes(InputStream is){
    DataSource ds=new DataSource(is);
    System.out.println("LoadInputStream.loadBytes() - Creating DataSource (InputStream)");
    System.out.println("LoadInputStream.loadBytes() - Creating Player");
    try {
    player = Manager.createPlayer(ds);
    } catch(NoPlayerException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch(IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    System.out.println("LoadInputStream.loadBytes() - Adding Controller Listener");
    player.addControllerListener(this);
    System.out.println("LoadInputStream.loadBytes() - realizing player");
    player.realize();
    public static void main(String[] args){
    new LoadInputStream();
    public void controllerUpdate(javax.media.ControllerEvent e) {
    if(e instanceof RealizeCompleteEvent){
    System.out.println("Adding visual component");
    getContentPane().add(player.getVisualComponent());
    player.start();
    =============================Datasource==========================================================
    import java.io.*;
    import java.nio.ByteBuffer;
    import javax.media.*;
    import javax.media.protocol.*;
    public class DataSource extends PullDataSource {
    private InputStream is;
    private byte [] bytes;
    /** Creates new MediaViewerDataSource */
    public DataSource(InputStream is) {
    super();
    this.is = is;
    try{
    int byteCount = is.available();
    bytes = new byte [byteCount];
    is.read(bytes);
    catch (Exception e){
    System.out.println(e);
    public PullSourceStream [] getStreams() {
    PullSourceStream [] streams = new PullSourceStream [1];
    InputSourceStream iss = new InputSourceStream(new ByteArrayInputStream(bytes), new FileTypeDescriptor(ContentDescriptor.RAW_RTP));
    streams[0] = iss;
    return streams;
    public void connect() {}
    public void disconnect() {}
    public String getContentType() {
    return new String("audio.x-wav");
    public MediaLocator getLocator() {
    return null;
    public void initCheck() {}
    public void setLocator(MediaLocator source) {}
    public void start() {}
    public void stop() {}
    public Object getControl(String s){
    return null;
    public Object [] getControls(){
    return null;
    public Time getDuration(){
    return null;
    =================================InputStream======================================================
    import java.io.InputStream;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullSourceStream;
    import javax.media.protocol.Seekable;
    import javax.media.protocol.SourceStream;
    * Build a source stream out of an input stream.
    * @see DataSource
    * @see SourceStream
    * @see java.io.InputStream
    * @version %I%, %E%.
    public
    class InputSourceStream implements PullSourceStream, Seekable {
    protected InputStream stream;
    protected boolean eosReached;
    ContentDescriptor contentType;
    protected ByteBuffer inputBuffer;
    * Construct an <CODE>InputSourceStream</CODE> from an input stream.
    * @param s The input stream to build the source stream from.
    * @param type The content-type of the source stream.
    public InputSourceStream(InputStream s, ContentDescriptor type) {
    stream = s;
    eosReached = false;
    contentType = type;
    * Get the content type for this stream.
    * @return content descriptor for the stream.
    public ContentDescriptor getContentDescriptor() {
    return contentType;
    * Obtain the content length
    * @return content length for this stream.
    public long getContentLength() {
    return SourceStream.LENGTH_UNKNOWN;
    * Query if the next read will block.
    * @return true if a read will block.
    public boolean willReadBlock() {
    if( eosReached == true) {
    return true;
    } else {
    try {
    return stream.available() == 0;
    } catch (IOException e) {
    return true;
    * Read a buffer of data.
    * @param buffer The buffer to read data into.
    * @param offset The offset into the buffer for reading.
    * @param length The number of bytes to read.
    * @return The number of bytes read or -1 indicating end-of-stream.
    public int read(byte[] buffer, int offset, int length) throws IOException {
    int bytesRead = stream.read(buffer, offset, length);
    if( bytesRead == -1) {
    eosReached = true;
    inputBuffer.get(buffer,offset,length);
    return bytesRead;
    * Turn the stream off.
    * @exception IOException Thrown if there is a problem closing the stream.
    public void close() throws IOException {
    stream.close();
    * Return if the end of stream has been reached.
    * @return true if the end of the stream has been reached.
    // $jdr: This is a bug. Need to figure out
    // the "correct" way to determine, before a read
    // is done, if we're at EOS.
    public boolean endOfStream() {
    return eosReached;
    * Returns an zero length array because no controls
    * are supported.
    * @return a zero length <code>Object</code> array.
    public Object[] getControls() {
    return new Object[0];
    * Returns <code>null</code> because no controls are implemented.
    * @return <code>null</code>.
    public Object getControl(String controlName) {
    return null;
    public long seek(long where) {
    try {
    inputBuffer.position((int)(where));
    return where;
    catch (IllegalArgumentException E) {
    return this.tell(); // staying at the current position
    public long tell() {
    return inputBuffer.position();
    public void SeekableStream(ByteBuffer byteBuffer) {
    inputBuffer = byteBuffer;
    this.seek((long)(0)); // set the ByteBuffer to to beginning
    public boolean isRandomAccess() {
    // TODO Auto-generated method stub
    return false;
    }

    Use a BufferedImage where you draw the other images.
    You have to know the size.
    For example if the size is (50*50) for each image :
    int width =50;
    int height = 50;
    BufferedImage bufIm = new BufferedImage(width*3,height*3,BufferedImage.TYPE_INT_ARGB);
    Graphics gr = bufIm.createGraphics();
    int k, j;
    Toolkit tk = Toolkit.getDefaultToolkit();
    Image imTemp;
    for (k = 0; k<3; k++) {
        for (j = 0; j<3; j++) {
            imTemp = tk.getImage(imageNames[k][j]);
            gr.drawImage(imTemp,width*k,height*j, this); // replace this by the Image observer you want (this if you are in a panel for example)
    }After that bufIm contains the images as you want and you can paint it on a Graphics.
    Denis

  • Please help me, i'm about to ditch my nano!!

    Whilst charging my nano after not using it for quite some time (it was totally dead) I accidentally unplugged it after about 15 minutes while it said "do not disconnect" anyway.... now it won't turn on, won't charge when its plugged in, and my computer won't recognise it.
    I have tried the 5 r's.
    I can't restore or reset as my computer won't recognise it so what on earth do i do?!?!?! Please help me, have i murdered my nano??

    I can't restore or reset as my computer won't
    recognise it so what on earth do i do?!?!?! Please
    help me, have i murdered my nano??
    your computer doesn't need to recognise your iPod to reset it.
    put HOLD on, then turn it off
    hold the MENU and SELECT buttons down together for 5-6 secs
    the apple logo should appear

  • Urgent!! Please Help! Security Question!

    I have forgotten the answers to my security questions (all three). As i made my Apple ID over 3 years ago, it did not ask me for a recovery e-mail adress. Is there any way i can reset the answers without the e-mail? Please Help!!

    Welcome to the Apple Community.
    ou should contact AppleCare who will initially try to assist you with a reset email or if unsuccessful will pass you to the security team to reset your security questions for you.
    If you are in a region that doesn't have international telephone support try contacting Apple through iTunes Store Support.

  • Help needed with JDBC - please help! (newbie)

    hi all
    i m new to jdbc
    i have installed MySQL server on my winxp machine
    i used the command:
    mysql -p -u root
    Enter password: ****now when writing a prog i m getting a prob at this piece of code:
    Connection con=DriverManager.getConnection("jdbc:odbc:books","root","root");wot is wrong wid this code?
    please help......
    thanks in advance

    There are about 20 different things that could be wrong a this point; I'm not going to list them all. If you want specific help, you need to post specific information. This is usually done by posting either a stack trace from an exception, or a more complete section of code and a description of the problem and ALL the symptoms. You have all the information on what you've done, we have none of it.
    Instead of trying to diagnose whats wrong with your ODBC setup, I'm going to give you some strong advice; don't use ODBC with JDBC if you can avoid it, and with MySQL you can avoid it. It makes things simpler, less can go wrong, and you don't have to configure a DSN on every machine that you install the program on.
    To use "pure" JDBC without ODBC for MySQl:
    1) download the JDBC driver (you might already have this)
    http://dev.mysql.com/downloads/connector/j/3.1.html
    2) follow the installation instructions
    http://dev.mysql.com/doc/refman/5.0/en/java-connector.html
    In particular, make sure your classpath is set correctly
    3) Here's an example of loading the driver and establishing a connection
    http://dev.mysql.com/doc/refman/5.0/en/cj-connect-with-drivermanager.html
    Note the form of the connection URL,
    "jdbc:mysql://localhost/test?user=monty&password=greatsqldb"
    This is what an URL without ODBC looks like; there is no DSN, which means no DSN has to be configured.
    4) The MySQL database has some built-in security, to prevent malicious connections from outside computers. Solutions to that and other common problems are here:
    http://dev.mysql.com/doc/refman/5.0/en/cj-faq.html

  • Newbie question about saving files

    Hi all,
    A newbie question here, and maybe it is a dumb question, but I can't get my head around this and sofar found no answer in the forums here.
    When I save a file on my macbook, I can only save it to "top" folders.
    What I mean is I try to save a file for instance to documents/worddocs/lyrics just to say something, then I have to save the file first to documents, and the move it to the lyrics folder via finder or move it to :worddocs folder and then move it again to the lyrics folder. Hope you still get my drift here
    Is there a way to just save it to the subfolders without going through all this moving around?
    Thanks in advance for any advice
    Peter

    When you click File>Save As, you will see the Save As window pop up. At the top, you will see a box entitled Save As, which has a space for your to enter the file name. To the right of this box is an arrow pointing down. Click it. The full file hierarchy will be seen. Then you can save directly to the file you want.
    Hope this helps.
    Don

  • Two (too much?) newbies questions about KT3 Ultra 2

    Goodmorning all.
    I've bought a KT3 Ultra2 (MS-6380E) motherboard and i've two questions about it.
    First of all I need to buy the optional S-Bracket to use my SPDif sound sistem... where can i buy it in Italy or in Internet?
    In second i've to know the highest processor my MB support becouse i have to upgrade my PC.
    Can U help me?
    Tha a lot and sorry for disturb.
    Hallo.

    Hello,
    question 2, not sure about question 1,
    http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_cpu_support_detail.php?UID=341&kind=1
    You may need this BIOS update too.
    http://www.msi.com.tw/program/support/bios/bos/spt_bos_detail.php?UID=341&kind=1

  • Newbie Question about FM 8 and Acrobat Pro 9

    Hello:
    I have some dcouments that I've written in FM v8.0p277. I print them to PDF so that I can have a copy to include on a CD and I also print some hard copies.
    My newbie question is whether there is a way to create a  PDF for hard copy where I mainitain the colors in photos and figures but that the text that is hyperlinked doesn't appear as blue. I want to keep the links live within the soft copy. Is there something I can change within Frame or with Acrobat?
    TIA,
    Kimberly

    Kimberly,
    How comes the text is blue in the first place? I guess the cross-reference formats use some character format which makes them blue? There are many options:
    Temporarily change the color definition for the color used in the cross-reference format to black.
    Temporarily change the character format to not use that color.
    Temporarily change the cross-reference definition to not used that character format.
    Whichever method you choose, I would create a separate document with the changed format setting and import those format into your book, create the PDF and then import the same format from the official template.
    - Michael

  • Newbie question about loading servlets on tomcat

    I have what is probably a very basic question about loading simple servlets on to tomcat to test its installation. I have followed instructions from numerous tutorials to the letter but still I can't get it to work.
    I have installed tomcat on win2k in c:\tomcat. I set up the jdk, environment vars (JAVA_HOME, CATALINA_HOME, TOMCAT_HOME) which all point at the correct dirs. I can compile a servlet without errors. I can also place a test jsp and html file into the root directory and they both work fine.
    However, now I am trying a test servlet and no matter what I do it gives me a 404. I have a servlet class file called "HelloServlet.class" which I placed into the %install_dir%\webapps\ROOT\WEB-INF\classes directory. I try to reference it using this url:
    http://localhost/servlet/HelloServlet
    Tomcat is configured to use port 80 and has been restarted after adding the servlet class file. Does anyone have a clue why this is not working for me?
    Many thanks
    Marc

    You have to add in the web.xml file that it is in the WEB-INF dir, the information about your servlet. An example:
    <web-app>
    <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/HelloServlet</url-pattern>
    </servlet-mapping>
    </web-app>

  • Please i have a question about to YOUTUBE App.

    Dear all,
    i have a question about YOUTUBE app.
    i have Iphone 3G.
    as i use youtube a new error message has appeared "Cannot Connect to YouTube"
    noted that i could't use YouTube before.
    Thanks ,
    Ashraf

    I don't use that app. I just go to the web based site. You can share videos from the site, but not from the app, as far as I have been able to do. Try the web based version and see if you get the same error. Go through Safari is what I mean.

  • Newbie Question About Compiling

    Hi,
    I have a .jar file. Extracted it, because I needed to change a string value in my Blah.java file.
    How do I recompile in JDeveloper?
    Thank you very much.

    Brenden,
    Thank you, but when I import the Project is empty.
    Time is of the essence to me right now, so I tried to compile via command line. Since I just changed one file, I thought I need to compile only that file, right? Wrong... See the errors below.
    Looks like I need to compile the entire code-base. How do I do that via command line? Please, help. Thank you,
    C:\jdk1.5.0_06\bin\com\Blah\im\wsapi>c:\jdk1.5.0_06\bin\javac BlahServiceClient.
    java
    BlahServiceClient.java:7: cannot find symbol
    symbol : class BlahquantityManagerServiceServiceLocator
    location: class com.Blah.im.wsapi.BlahServiceClient
    BlahquantityManagerServiceServiceLocator locator = new BlahInve
    ntoryManagerServiceServiceLocator();
    ^
    BlahServiceClient.java:7: cannot find symbol
    symbol : class BlahquantityManagerServiceServiceLocator
    location: class com.Blah.im.wsapi.BlahServiceClient
    BlahquantityManagerServiceServiceLocator locator = new BlahInve
    ntoryManagerServiceServiceLocator();
    ^
    BlahServiceClient.java:8: cannot find symbol
    symbol : class BlahquantityManagerServiceAvailsPort
    location: class com.Blah.im.wsapi.BlahServiceClient
    BlahquantityManagerServiceAvailsPort service = locator.getBlahI
    nventoryManagerServiceAvailsPort();
    ^
    BlahServiceClient.java:10: cannot find symbol
    symbol : class AvailsRequest
    location: class com.Blah.im.wsapi.BlahServiceClient
    AvailsRequest availsRequest = new AvailsRequest();
    ^
    BlahServiceClient.java:10: cannot find symbol
    symbol : class AvailsRequest
    location: class com.Blah.im.wsapi.BlahServiceClient
    AvailsRequest availsRequest = new AvailsRequest();
    ^
    BlahServiceClient.java:14: cannot find symbol
    symbol : class ProductSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    ProductSpec productSpec = new ProductSpec();
    ^
    BlahServiceClient.java:14: cannot find symbol
    symbol : class ProductSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    ProductSpec productSpec = new ProductSpec();
    ^
    BlahServiceClient.java:16: cannot find symbol
    symbol : class SegmentSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    SegmentSpec segmentSpec = new SegmentSpec();
    ^
    BlahServiceClient.java:16: cannot find symbol
    symbol : class SegmentSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    SegmentSpec segmentSpec = new SegmentSpec();
    ^
    BlahServiceClient.java:17: cannot find symbol
    symbol : class TimeSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    TimeSpec timeSpec = new TimeSpec();
    ^
    BlahServiceClient.java:17: cannot find symbol
    symbol : class TimeSpec
    location: class com.Blah.im.wsapi.BlahServiceClient
    TimeSpec timeSpec = new TimeSpec();
    ^
    BlahServiceClient.java:46: cannot find symbol
    symbol : class AvailsRequest
    location: class com.Blah.im.wsapi.BlahServiceClient
    AvailsRequest[] availsRequestArray = {availsRequest};
    ^
    BlahServiceClient.java:49: cannot find symbol
    symbol : class AvailsResponse
    location: class com.Blah.im.wsapi.BlahServiceClient
    AvailsResponse[] responseArray = service.getAvails(availsRequest
    Array);
    ^
    BlahServiceClient.java:54: cannot find symbol
    symbol : class AvailsResponse
    location: class com.Blah.im.wsapi.BlahServiceClient
    for (AvailsResponse availsResponse : responseArray) {
    ^
    BlahServiceClient.java:58: cannot find symbol
    symbol : class Avail
    location: class com.Blah.im.wsapi.BlahServiceClient
    Avail[] availsArray = availsResponse.getAvails();
    ^
    BlahServiceClient.java:60: cannot find symbol
    symbol : class Avail
    location: class com.Blah.im.wsapi.BlahServiceClient
    for (Avail avails : availsArray) {
    ^
    16 errors

Maybe you are looking for