This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

net beans

 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii...m new to this forum plzzzzzzz help...

i have just installed netbeans IDE 7.0 and tried to run my project (which executes fine when i run with traditional method using command prompt) based on image processing but applet viewer says that "start: applet not initialized" whereas compiling (term 'build' in net beans) is successful..

here m attaching 2 relevant java files while whole project have 3-4 more java files for image rendering.....

thanks in advance..



 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running the applet in a browser - if there are problems, then some error messages should be written to the Java Console.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey....thanks for reply........... but as i am new to net beans , i dunno know how to run in browser . so please tell how to do it....

and also if we have to do any changes in setting or code when we shift to net beans... thanks again...
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create an HTML file that contains the APPLET tag that you now have at the top of the Java source code. If you don't know how to create an HTML page, just copy a simple one from an HTML tutorial. You'll find much useful material linked in the AppletsFaq, not least about how to get started.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it says following is the error in the console:

Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\NiKiL
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


load: class ImageFilterDemo not found.
java.lang.ClassNotFoundException: ImageFilterDemo
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: ImageFilterDemo
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the APPLET tag, and tell us where ImageFilterDemo.class is relative to the HTML file.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the applet tag written in html file:


and i have placed all the files in default package under source package.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.class files are under build-classes whereas the ImageFilterDemo.html is under build.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the classes are not in the same directory as the HTML file then you need to use a codebase attribute; see http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html for details.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much for your kind cooperation.... it executed successfully..
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanted to know how we can call another program of jAppletform in our main program(which we run & is of same type,a JAppletform), at the click of menu item....

as such we direct to another page at the click of the menu item..

details: i have made MenuBar with a menu 'image operations' having menuItems 'Blur' , 'Sharpen' etc.
and a second menu 'Msg encoding' having menuItems 'LSB encoding' , 'DCT encoding' ..

now for image operations performed successfully .... and have a another File 'LSB' for performing LSB encoding..

Now i want at the click of menuItem 'LSB encoding' it should redirect to File 'LSB' with all previous thing cleared on screen.

How can I do this...

thanks for your reply
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what it would mean to "redirect to a file" - do you mean applet? or web page?

AppletContext has a method showDocument that you can use to switch to a different web page.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both are JApplets
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do they have to be separate applets? Have you considered having just as single applet using a CardLayout for switching between the major functional areas?
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for cardlayout i have to make changes.. i will try for that but if there is some thing that i can do in menuitem actionperformed method so that it can call another whole program.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already told you how to switch to a web page containing a different applet. If that is not what you want, then describe in detail what it actually *is* that you are trying to achieve.

As to having to make changes, I think avoiding having to maintain two web pages with two applets, and the associated architectural difficulties trying to share data between them, are worth quite a bit of effort to fix.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for giving the idea of CardLayout and showDocument ........
here i again have a minor problem...

i am using NetBeans 7.0 and in JApplet Form using palette I am dragging and dropping menubar but is not visible in design....

but appears when executed..

it is also not showing any properties in property window and displays 'no property'...

can you please tell me where I am lacking..
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IDE-specific questions fit better in the IDE forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic