Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: ISSUES in java.awt

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post ISSUES in java.awt

    Hi All

    I am new to java programming and this is my first code.
    I have issues in one of my java code
    It says

    import java.awt.Dimension;
    import java.awt.image.BufferedImage;
     
    import javax.imageio.ImageIO;
    import javax.media.Buffer;
    import javax.media.CannotRealizeException;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSourceException;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.media.control.FrameGrabbingControl;
    import javax.media.format.RGBFormat;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.CaptureDevice;
    import javax.media.protocol.DataSource;
    import javax.media.util.BufferToImage;

    The error is
    "The import java.awt.Dimension could not be resolved"

    I am using the version below ( java -version)

    java version "1.7.0"
    Java(TM) SE Runtime Environment (build 1.7.0-b147)
    Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)
    Attached Files Attached Files
    Last edited by mailkamlesh; August 25th, 2011 at 01:02 AM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: ISSUES in java.awt

    If you want help, you should provide an SSCCE that demonstrates the problem- something as short as possible that we can copy and paste and still get the exact error (so it should still be a full class, but with almost nothing in it).
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: ISSUES in java.awt

    Woi! I'm sure I replied to this earlier. And it was a long reply *sob* OK, from memory:
    I am new to java programming
    Welcome to Java!
    and this is my first code.
    Yeah right - as if.
    The import java.awt.Dimension
    Wait - I see some 'android' in your image. If you're compiling this for the Android platform, you know there's no Abstract Windowing Toolkit, right? Of course you don't - you're new to java programming. Why didn't you start with "Hello, World!"? Android uses the Dalvik VM which is not a JVM - you need classes from here:
    Package Index | Android Developers
    ... unless you really do want to compile an application for a proper JVM, in which case you need to find out why your IDE isn't compiling your application with classes from the JDK.

Similar Threads

  1. [SOLVED] Method issues
    By hello_world in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 13th, 2011, 06:45 PM
  2. issues with a float
    By 2k. in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 30th, 2011, 12:03 PM
  3. Recursion issues.
    By ender16 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 30th, 2011, 09:03 PM
  4. Java sliding block puzzle issues
    By Vesper in forum What's Wrong With My Code?
    Replies: 15
    Last Post: April 11th, 2011, 07:30 AM
  5. Triangle issues
    By FrEaK in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 24th, 2010, 08:49 AM