Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can someone plz check it

 
manishjain Jain
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am just a beginner and made a first program in swing which is as shown below:
import javax.swing.*;
import java.awt.*;

public class TryWindow
{
static JFrame aWindow = new JFrame("This is the Window Title");

public static void main(String[] args)
{
Toolkit thekit = aWindow.getToolkit();
Dimension wndSize = thekit.getScreenSize();

aWindow.setBounds(wndSize.width/4, wndSize.height/4, wndSize.width/2, wndSize.height/2);
// aWindow.setDefaultsCloseOperation(EXIT_ON_CLOSE);
aWindow.setVisible(true);
}
}

after compiling and during run i got the error message :

Exception in thread 'main' java .lang.error: can't load.incors.plaf.kunststoff.kunststoffLook and Feel

i checked in two computers but error is still the same ..can somebody help me that

Thanks
Manish Jainafter compiling and during run i got the error message :
 
Darin Niard
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works fine for me.

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The error message suggests that the Java installations have been incorrectly customized and, in the process, broken on those machines. The "KunststoffLookAndFeel" referred to is a third-party product, and should not be required for the operation of your program. The best thing for you to do would be to talk to someone in your area -- someone who may have had something to do with setting up Java -- and have them help you clear up the problem.
 
manishjain Jain
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply....i will check my computer
 
manishjain Jain
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Darin Niard and Ernest Friedman-Hill for your help. I removed the java from the computer and reinstalled the whole setup . It worked!!!

Thankyou for your great help.
Manish Jain
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic