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 4 of 4

Thread: What is wrong?

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default What is wrong?

    Hello!
    I tried to make a splash screen it didn't work.
    Here is the error message: Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    JSplash cannot be resolved to a type
    JSplash cannot be resolved to a type

    at com.mime.splashscreen.SplashScreen.main(SplashScre en.java:8)

    The code is:
    package com.mime.splashscreen;
     
    public class SplashScreen {
     
    	private static final String Color = null;
     
    	public static void main(String[] args) {
    		JSplash splash=new JSplash(SplashScreen.class.getResource("splash.png"), true, true, false, "V1", 
    				null, java.awt.Color.RED, java.awt.Color.BLACK);
     
    	}
     
    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: What is wrong?

    JSplash cannot be resolved to a type
    Where is the class: JSplash defined? The compiler can not find its definition.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: What is wrong?

    Quote Originally Posted by Norm View Post
    Where is the class: JSplash defined? The compiler can not find its definition.
    I don't have the class JSplash, but it should work without a class named JSplash? Right? Or if not, how to do so it works?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: What is wrong?

    code can NOT use a class that is not defined.
    Either find the definition for JSPlash and put it where the compiler can find it
    or remove JSplash from the program.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 4
    Last Post: March 6th, 2014, 05:14 PM
  2. [SOLVED] Where am I going wrong
    By keepStriving in forum What's Wrong With My Code?
    Replies: 8
    Last Post: October 28th, 2013, 07:45 PM
  3. what wrong with this??
    By sephskie in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 14th, 2012, 07:50 PM
  4. [SOLVED] Help me to fix the bug?
    By arvindbis in forum JDBC & Databases
    Replies: 4
    Last Post: October 14th, 2011, 04:13 AM
  5. Not sure what is wrong with this
    By jwb4291 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: June 29th, 2010, 02:23 PM