473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Applet size

Hi all!

I've a pretty naive problem with my applet which is as follows.....

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. // Wordlist for GRE High Frequency Words
  4.  
  5. import java.awt.*;
  6. import java.applet.*;
  7. import java.awt.event.*;
  8.  
  9. /* <applet code="Wordlist.class" width=800 height=600> </applet> */
  10.  
  11. public class Wordlist extends Applet 
  12.  {
  13.  
  14. TextField m1 ,m2 ,m3 ,m4 ,m5 ,m6 ,m7 ,m8 ,m9 ;
  15.  
  16. public void init() {
  17.  
  18. Label f1 = new Label("subside; lessen                           ",Label.LEFT);
  19. Label f2 = new Label("deviating from the normal or right course ", Label.LEFT); 
  20. Label f3 = new Label("to intensify                ", Label.LEFT);
  21. Label f4 = new Label("temporary inactivity                      ", Label.LEFT);
  22. Label f5 = new Label("depart suddenly and hide                  ", Label.LEFT);
  23. Label f6 = new Label("moderate in eating, drinking, etc.        ", Label.LEFT);
  24. Label f7 = new Label("warn reprove                              ", Label.LEFT);
  25. Label f8 = new Label("make impure                               ", Label.LEFT);
  26. Label f9 = new Label("of beauty; appreciating beauty            ", Label.LEFT);
  27.  
  28. m1 = new TextField(6);
  29. m2 = new TextField(6);
  30. m3 = new TextField(6);
  31. m4 = new TextField(6);
  32. m5 = new TextField(6);
  33. m6 = new TextField(6);
  34. m7 = new TextField(6);
  35. m8 = new TextField(6);
  36. m9 = new TextField(6);
  37.  
  38. add(f1); add(m1); 
  39. add(f2); add(m2); 
  40. add(f3); add(m3); 
  41. add(f4); add(m4); 
  42. add(f5); add(m5); 
  43. add(f6); add(m6); 
  44. add(f7); add(m7); 
  45. add(f8); add(m8); 
  46. add(f9); add(m9);
  47.  
  48. }
  49.  
  50. }
  51.  
  52.  
When i run the given applet.. it works absolutely fine.. It has a meaning of a word written and a corresponding textfields where the word can be typed. But the problem is that when i add lots of other meanings and textfields to the above programs.. about 350 (i know it was painful and i would welcome some other way out of this tedious job)... the applet doesn't initialize. Is it occuring because i'm not using a scrollbar. Anybody help me please! I'm running windows XP.

The error it shows in the appletviewer is "Applet not initialized"
and in the prompt it says :

java.lang.NullPointerException
Jul 5 '07 #1
1 2470
odefta
18
Probably you must increase the Java applet memory limit.

Click on 'Control Panel'

Double click on the 'Java Plug-in' icon

Select the 'Java' tab and click on the 'View...' button, under the 'Java Applet Runtime Settings' section.

Find the most recent 'Version' Java runtime line (below: 1.5.0_06 is more recent than 1.5.0_05) and double click on the 'Java Runtime Parameters' box and add "-Xmx300m" (set Java maximum heap size to 300 MB)

http://www.duckware.com/pmvr/howtoincreaseappletmemory.html
Jul 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Laura | last post by:
Hello, Newbie question: Does anyone know how to dynamically set the screen width in an applet? I have an applet that creates a horizontal bar menu on a webpage, and I would like the width to be...
3
by: Jeff T. | last post by:
I have an applet that sizes itself to the size of the browser frame that it is running in. On IE the applet resizes upon dragging the frame divider. I'm having a problem with getting this...
1
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of...
2
by: Michael | last post by:
Hello Currently I'm migrating an applet from Java 1.1 to 1.3. Targetplattform: Microsoft Internet Explorer 5.x with Sun's Java VM 1.3.1 Problem: The attached applet works fine with the...
0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
2
by: Christian Galbavy | last post by:
Hy! My next problem is to make an applet from my program. I have just add the "extend applet" to my class and removed the main-method by the start-method of the applet. I was thinking that this...
1
by: Tormod Omholt-Jensen | last post by:
Ï need to dynamically insert an applet into a document. In IE 6.0 my code works fine, but there seems to be problems in Opera 7. The page looks like there is allocated space for an applet. ...
2
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of...
1
by: dishal | last post by:
Can anyone help me please? How do I convert these codes to launch from a JFrame instead of a Java Applet? A simple program where the user can sketch curves and shapes in a variety of...
2
by: ManidipSengupta | last post by:
Hi, a few (3) questions for the Java experts, and let me know if this is the right forum. It deals with 100% java code (reason for posting here) but manages a Web browser with Javascript. Thanks in...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.