Java

Moderators: zibadian
Number of threads: 7818
Number of posts: 18218

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
HELP PROBLEM Posted by tolli on 11 Mar 2007 at 11:30 AM
hey guys...in netbeans5.5 i did the following:

I opened a new project and I added a new JFrame. after making the design, I added in the source the class Student in addition to the class NewJframe that alreay is templated. however, it gave me an error because class Student should be in a java file. I put it in a java file and i packaged it then i imported the package into the source code where NewJFrame class exists. The error is now "Package does not exist"

how to deal with this pblm???

10x
Report
Re: HELP PROBLEM Posted by zibadian on 11 Mar 2007 at 12:30 PM
: hey guys...in netbeans5.5 i did the following:
:
: I opened a new project and I added a new JFrame. after making the design, I added in the source the class Student in addition to the class NewJframe that alreay is templated. however, it gave me an error because class Student should be in a java file. I put it in a java file and i packaged it then i imported the package into the source code where NewJFrame class exists. The error is now "Package does not exist"
:
: how to deal with this pblm???
:
: 10x
:
Is the package in the library folder of the compiler and netbeans? You don't necessarily need to make a package of it. As long as it is in the same folder as the frame source.
I don't know netbeans and only used eclipse as editor, so my experience in that respect is quite limited. Eclipse can link java files together if they are in the same folder.
Report
Re: HELP PROBLEM Posted by tolli on 11 Mar 2007 at 2:03 PM
yes man they r in the same folder and now it worked :)

u r right no packaging is needed .. they are linked

may i ask u about the colors? i mean i wanna display buttons and panels in blue or red...what is the command for it??

thanks
Report
Re: HELP PROBLEM Posted by zibadian on 12 Mar 2007 at 12:59 AM
: yes man they r in the same folder and now it worked :)
:
: u r right no packaging is needed .. they are linked
:
: may i ask u about the colors? i mean i wanna display buttons and panels in blue or red...what is the command for it??
:
: thanks
:
See the following methods:
JComponent.setBackground
JComponent.setForeground
The actual coding should be easy enough.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.