Hi all,
Thanks in advance. I am new at Java. Currently I'm having two java files one is applet. when i try to preview the applet i get an error like this :
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at javax.swing.JEditorPane.registerEditorKitForConten tType(Unknown Source)
at javax.swing.JEditorPane.registerEditorKitForConten tType(Unknown Source)
at javax.swing.JEditorPane.loadDefaultKitsIfNecessary (Unknown Source)
at javax.swing.JEditorPane.getKitTypeRegistry(Unknown Source)
at javax.swing.JEditorPane.getEditorKitClassNameForCo ntentType(Unknown Source)
at javax.swing.JTextPane.<init>(Unknown Source)
what i'm doing wrong?pls help me guys...thanks
21 4007
Can you show a bit of (relevant) code please? btw, I changed your topic titile
to something more to the point.
kind regards,
Jos
because you pointed to hashtable that doesn't have the key ?
check your code that use that hashtable ...
Hi all,
Thanks Josah. Erm, what do you mean by hashtable nick?I don't understand..Sorry.btw this is my code that call JTextPane
code :
private JTextArea textArea = null;
private JTextPane resultArea = null;
private JComboBox langBox = null;
private Map<Language, ConfigurationDialog> configDialogs = new HashMap<Language, ConfigurationDialog>();
public void createAndShowGUI(String inputText) {
JFrame frame = new JFrame("Test");
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOS E);
textArea = new JTextArea(inputText);
// TODO: wrong line number is displayed for lines that are wrapped automatically:
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
resultArea = new JTextPane();
resultArea.setContentType("text/html");
resultArea.setText("Results will appear here");
JLabel label = new JLabel("Please type or paste text to check in the top area");
JButton button = new JButton("Check text");
button.setMnemonic('c');
button.addActionListener(this);
Hi all,
Thanks Josah. Erm, what do you mean by hashtable nick?I don't understand..Sorry.btw this is my code that call JTextPane
code :
private JTextArea textArea = null;
private JTextPane resultArea = null;
private JComboBox langBox = null;
private Map<Language, ConfigurationDialog> configDialogs = new HashMap<Language, ConfigurationDialog>();
public void createAndShowGUI(String inputText) {
JFrame frame = new JFrame("Test");
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOS E);
textArea = new JTextArea(inputText);
// TODO: wrong line number is displayed for lines that are wrapped automatically:
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
resultArea = new JTextPane();
resultArea.setContentType("text/html");
resultArea.setText("Results will appear here");
JLabel label = new JLabel("Please type or paste text to check in the top area");
JButton button = new JButton("Check text");
button.setMnemonic('c');
button.addActionListener(this);
1.) Please use code tags when posting code.
2.) If you look at that stacktrace again, you'll see that it tells you the exact line number where that exception was thrown. That line and the code lines around it are the relevant code that Jos asked you to post.
oh...thanks guys,
ok...here is the code that is relevant to the trace and the full trace
trace : -
-
Java Plug-in 1.6.0_02
-
Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
-
User home directory = C:\Documents and Settings\Administrator
-
network: Loading user-defined proxy configuration ...
-
network: Done.
-
network: Loading proxy configuration from Internet Explorer ...
-
network: Done.
-
network: Loading direct proxy configuration ...
-
network: Done.
-
network: Proxy Configuration: No proxy
-
-
-
----------------------------------------------------
-
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
-
p: reload proxy configuration
-
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>
-
----------------------------------------------------
-
-
liveconnect: Invoking JS method: document
-
liveconnect: Invoking JS method: URL
-
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@12498b5, refcount=1
-
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@f5da06
-
basic: Loading applet ...
-
basic: Initializing applet ...
-
basic: Starting applet ...
-
basic: completed perf rollup
-
liveconnect: Invoking method: public void test.check(java.lang.String)
-
liveconnect: Needs conversion: java.lang.String --> java.lang.String
-
java.lang.NullPointerException
-
at java.util.Hashtable.put(Unknown Source)
-
at javax.swing.JEditorPane.registerEditorKitForContentType(Unknown Source)
-
at javax.swing.JEditorPane.registerEditorKitForContentType(Unknown Source)
-
at javax.swing.JEditorPane.loadDefaultKitsIfNecessary(Unknown Source)
-
at javax.swing.JEditorPane.getKitTypeRegistry(Unknown Source)
-
at javax.swing.JEditorPane.getEditorKitClassNameForContentType(Unknown Source)
-
at javax.swing.JTextPane.<init>(Unknown Source)
-
at mypack.Main.createAndShowGUI(main.java:84)
-
at mypack.Main.openGui(main.java:236)
-
at test.check(test.java:27)
-
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
-
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
-
at java.lang.reflect.Method.invoke(Unknown Source)
-
at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
-
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
-
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
-
at java.lang.reflect.Method.invoke(Unknown Source)
-
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
-
at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
-
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
-
at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
-
at java.security.AccessController.doPrivileged(Native Method)
-
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
-
java.lang.Exception: java.lang.NullPointerException
-
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
-
at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
-
at java.security.AccessController.doPrivileged(Native Method)
-
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
-
-
and the relevant code is : -
private JTextArea textArea = null;
-
private JTextPane resultArea = null;
-
private JComboBox langBox = null;
-
-
private Map<Language, ConfigurationDialog> configDialogs = new HashMap<Language, ConfigurationDialog>();
-
-
public Main() {
-
}
-
-
public void createAndShowGUI(String inputText) {
-
JFrame frame = new JFrame("Grammar Check Tool");
-
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
-
textArea = new JTextArea(inputText);
-
// TODO: wrong line number is displayed for lines that are wrapped automatically:
-
textArea.setLineWrap(true);
-
textArea.setWrapStyleWord(true);
-
JTextPane resultArea = new JTextPane();
-
resultArea.setContentType("text/html");
-
resultArea.setText("Results will appear here");
-
JLabel label = new JLabel("Please type or paste text to check in the top area");
-
JButton button = new JButton("Check text");
-
button.setMnemonic('c');
-
button.addActionListener(this);
-
-
JButton configButton = new JButton(OPTIONS_BUTTON);
-
configButton.setMnemonic('o');
-
configButton.addActionListener(this);
-
-
JPanel panel = new JPanel();
-
panel.setLayout(new GridBagLayout());
-
GridBagConstraints buttonCons = new GridBagConstraints();
-
buttonCons.gridx = 0;
-
buttonCons.gridy = 0;
-
panel.add(button, buttonCons);
-
buttonCons.gridx = 1;
-
buttonCons.gridy = 0;
-
panel.add(new JLabel(" "), buttonCons);
-
buttonCons.gridx = 2;
-
buttonCons.gridy = 0;
-
-
buttonCons.gridx = 3;
-
buttonCons.gridy = 0;
-
buttonCons.insets = new Insets(0, 10, 0, 0);
-
//panel.add(configButton, buttonCons);
-
-
Container contentPane = frame.getContentPane();
-
GridBagLayout gridLayout = new GridBagLayout();
-
contentPane.setLayout(gridLayout);
-
GridBagConstraints cons = new GridBagConstraints();
-
cons.fill = GridBagConstraints.BOTH;
-
cons.weightx = 10.0f;
-
cons.weighty = 10.0f;
-
cons.gridx = 0;
-
cons.gridy = 0;
-
contentPane.add(new JScrollPane(textArea), cons);
-
cons.gridy = 1;
-
cons.weighty = 5.0f;
-
contentPane.add(new JScrollPane(resultArea), cons);
-
-
cons.fill = GridBagConstraints.NONE;
-
cons.gridx = 0;
-
cons.gridy = 2;
-
cons.weighty = 0.0f;
-
cons.insets = new Insets(3,3,3,3);
-
//cons.fill = GridBagConstraints.NONE;
-
contentPane.add(label, cons);
-
cons.gridy = 3;
-
contentPane.add(panel, cons);
-
-
frame.pack();
-
frame.setSize(600, 600);
-
frame.setVisible(true);
-
}
-
-
Thanks for your help...
Which of the lines is line #84 in method createAndShowGUI()?
kind regards,
Jos
Which of the lines is line #84 in method createAndShowGUI()?
kind regards,
Jos
resultArea = new JTextPane();
regards,
teenICe
Here is one nit that is a good recipe for brewing nullpointers.
You have - JTextPane resultArea = new JTextPane();
inside your createGUI method. This hides the resultArea already defined in the class using - private JTextPane resultArea = null;
. The later resultArea variable is thus probably not being initialized properly.
resultArea = new JTextPane();
regards,
teenICe
Got it: you have a member variable resultArea but you also define a local variable
with the same name; it effectively hides the member variable which will remain
null all the time. Don't define that local variable.
kind regards,
Jos
resultArea = new JTextPane();
regards,
teenICe
Something is rotten in the state of Denmark here ...
so..its means I must comment out this code : - private JTextPane resultArea = null;
thanks guys...
I'll try it... :)
so..its means I must comment out this code : - private JTextPane resultArea = null;
thanks guys...
I'll try it... :)
That's not what Jos said. Read it again. Just don't define a new variable for it in your method.
@Jos, why would he get a nullpointer at that line? I'd expect the nullpointer to occur somewhere else, most likely outside the createGUI method.
No...I try to comment out the code but still have same error...I don't know what I'm doing wrong.Hmm...maybe I'm not understand enough.Can you guys explain it to me??Please...
Thanks in advance..
No...I try to comment out the code but still have same error...I don't know what I'm doing wrong.Hmm...maybe I'm not understand enough.Can you guys explain it to me??Please...
Thanks in advance..
Read the responses again. Commenting out lines of code that give errors does not neccessarily remove the errors.
In your method, you have - JTextPane resultArea = new JTextPane();
Just change that to - resultArea = new JTextPane();
like you did with that text area.
@Jos, why would he get a nullpointer at that line? I'd expect the nullpointer to occur somewhere else, most likely outside the createGUI method.
I don't know but I suspect the code is different from what we see here. A different
version mayhap ... that local variable definitely is a nono.
kind regards,
Jos
Commenting out lines of code that give errors does not neccessarily remove the errors.
That's the good ol' "amputation strategy". The old Romans already did that:
does your leg hurt? *Chop!* now it doesn't hurt anymore.
Nowadays people sometimes mistake Occam's Razor for the "amputation strategy" ;-)
kind regards,
Jos
I had try both of the method and still it give error.Let me explain what I'm trying to do and sorry if I had you guys confuse with my code.. :). The code that I copy just now is from open source code and it is create a gui for the application. The code is already a GUI so I create an applet to access the function that create the GUI and launch it using an applet so I can pass my parameters to certain function in the main code.
Now I'll paste the main code that create gui -
-
public class Main implements ActionListener {
-
-
private static final String OPTIONS_BUTTON = "Options...";
-
-
private JTextArea textArea = null;
-
private JTextPane resultArea = null;
-
private JComboBox langBox = null;
-
-
private Map<Language, ConfigurationDialog> configDialogs = new HashMap<Language, ConfigurationDialog>();
-
-
public Main() {
-
}
-
-
public void createAndShowGUI(String inputText) {
-
JFrame frame = new JFrame("Grammar Check Tool");
-
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
-
textArea = new JTextArea(inputText);
-
// TODO: wrong line number is displayed for lines that are wrapped automatically:
-
textArea.setLineWrap(true);
-
textArea.setWrapStyleWord(true);
-
resultArea = new JTextPane();
-
resultArea.setContentType("text/html");
-
resultArea.setText("Results will appear here");
-
JLabel label = new JLabel("Please type or paste text to check in the top area");
-
JButton button = new JButton("Check text");
-
button.setMnemonic('c');
-
button.addActionListener(this);
-
-
JButton configButton = new JButton(OPTIONS_BUTTON);
-
configButton.setMnemonic('o');
-
configButton.addActionListener(this);
-
-
JPanel panel = new JPanel();
-
panel.setLayout(new GridBagLayout());
-
GridBagConstraints buttonCons = new GridBagConstraints();
-
buttonCons.gridx = 0;
-
buttonCons.gridy = 0;
-
panel.add(button, buttonCons);
-
buttonCons.gridx = 1;
-
buttonCons.gridy = 0;
-
panel.add(new JLabel(" "), buttonCons);
-
buttonCons.gridx = 2;
-
buttonCons.gridy = 0;
-
langBox = new JComboBox();
-
/*for (Language lang : Language.LANGUAGES) {
-
if (lang != Language.DEMO) {
-
langBox.addItem(lang);
-
}
-
}*/
-
//panel.add(langBox, buttonCons);
-
buttonCons.gridx = 3;
-
buttonCons.gridy = 0;
-
buttonCons.insets = new Insets(0, 10, 0, 0);
-
//panel.add(configButton, buttonCons);
-
-
Container contentPane = frame.getContentPane();
-
GridBagLayout gridLayout = new GridBagLayout();
-
contentPane.setLayout(gridLayout);
-
GridBagConstraints cons = new GridBagConstraints();
-
cons.fill = GridBagConstraints.BOTH;
-
cons.weightx = 10.0f;
-
cons.weighty = 10.0f;
-
cons.gridx = 0;
-
cons.gridy = 0;
-
contentPane.add(new JScrollPane(textArea), cons);
-
cons.gridy = 1;
-
cons.weighty = 5.0f;
-
contentPane.add(new JScrollPane(resultArea), cons);
-
-
cons.fill = GridBagConstraints.NONE;
-
cons.gridx = 0;
-
cons.gridy = 2;
-
cons.weighty = 0.0f;
-
cons.insets = new Insets(3,3,3,3);
-
//cons.fill = GridBagConstraints.NONE;
-
contentPane.add(label, cons);
-
cons.gridy = 3;
-
contentPane.add(panel, cons);
-
-
frame.pack();
-
frame.setSize(600, 600);
-
frame.setVisible(true);
-
}
-
-
public void actionPerformed(ActionEvent e) {
-
String langName = "English";
-
Language language = Language.getLanguageForName(langName);
-
ConfigurationDialog configDialog = null;
-
if (configDialogs.containsKey(language)) {
-
configDialog = (ConfigurationDialog)configDialogs.get(language);
-
} else {
-
configDialog = new ConfigurationDialog(null, false);
-
configDialogs.put(language, configDialog);
-
// JOptionPane.showMessageDialog(null,"test");
-
}
-
JLanguageTool langTool;
-
try {
-
langTool = new JLanguageTool(language, configDialog.getMotherTongue());
-
langTool.activateDefaultPatternRules();
-
langTool.activateDefaultFalseFriendRules();
-
Set disabledRules = configDialog.getDisabledRuleIds();
-
if (disabledRules != null) {
-
for (Iterator iter = disabledRules.iterator(); iter.hasNext();) {
-
String ruleId = (String) iter.next();
-
langTool.disableRule(ruleId);
-
}
-
}
-
} catch (IOException ioe) {
-
throw new RuntimeException(ioe);
-
} catch (ParserConfigurationException ex) {
-
throw new RuntimeException(ex);
-
} catch (SAXException ex) {
-
throw new RuntimeException(ex);
-
}
-
if (e.getActionCommand().equals(OPTIONS_BUTTON)) {
-
List rules = langTool.getAllRules();
-
configDialog.show(rules);
-
} else {
-
if (textArea.getText().trim().equals("")) {
-
textArea.setText("Please insert text to check here");
-
} else {
-
StringBuffer sb = new StringBuffer();
-
resultArea.setText("Starting check...<br>\n");
-
resultArea.repaint(); // FIXME: why doesn't this work?
-
//TODO: resultArea.setCursor(new Cursor(Cursor.WAIT_CURSOR));
-
sb.append("Starting check in " +langName+ "...<br>\n");
-
int matches = 0;
-
try {
-
matches = checkText(langTool, textArea.getText(), sb);
-
} catch (Exception ex) {
-
sb.append("<br><br><b><font color=\"red\">" + ex.toString() + "<br>");
-
StackTraceElement[] elements = ex.getStackTrace();
-
for (StackTraceElement element : elements) {
-
sb.append(element + "<br>");
-
}
-
sb.append("</font></b><br>");
-
ex.printStackTrace();
-
}
-
sb.append("Check done. " +matches+ " potential problems found<br>\n");
-
resultArea.setText(sb.toString());
-
resultArea.setCaretPosition(0);
-
}
-
}
-
}
-
-
public int checkText(JLanguageTool langTool, String text, StringBuffer sb) throws IOException {
-
long startTime = System.currentTimeMillis();
-
List ruleMatches = langTool.check(text);
-
long startTimeMatching = System.currentTimeMillis();
-
int i = 0;
-
for (Iterator iter = ruleMatches.iterator(); iter.hasNext();) {
-
RuleMatch match = (RuleMatch) iter.next();
-
sb.append("<br>\n<b>" +(i+1)+ ". Line " + (match.getLine() + 1) + ", column " + match.getColumn()
-
+ "</b><br>\n");
-
String msg = match.getMessage();
-
msg = msg.replaceAll("<suggestion>", "<b>");
-
msg = msg.replaceAll("</suggestion>", "</b>");
-
msg = msg.replaceAll("<old>", "<b>");
-
msg = msg.replaceAll("</old>", "</b>");
-
sb.append("<b>Message:</b> " + msg + "<br>\n");
-
sb.append("<b>Context:</b> " + Tools.getContext(match.getFromPos(), match.getToPos(), text));
-
sb.append("<br>\n");
-
i++;
-
}
-
long endTime = System.currentTimeMillis();
-
sb.append("<br>\nTime: " + (endTime - startTime) + "ms (including "
-
+ (endTime - startTimeMatching) + "ms for rule matching)<br>\n");
-
return ruleMatches.size();
-
}
-
-
public void openGui (String input) {
-
/*final Main prg = new Main();
-
prg.createAndShowGUI("They is around. ");*/
-
JOptionPane.showMessageDialog(null,"open");
-
createAndShowGUI(input);
-
}
-
-
-
}
-
I hope you can help me to understand this code too.I really appreciate it.Thanks guys....
And this is the trace when i try to launch the GUI with my applet. -
-
Java Plug-in 1.6.0_02
-
Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
-
User home directory = C:\Documents and Settings\Administrator
-
network: Loading user-defined proxy configuration ...
-
network: Done.
-
network: Loading proxy configuration from Internet Explorer ...
-
network: Done.
-
network: Loading direct proxy configuration ...
-
network: Done.
-
network: Proxy Configuration: No proxy
-
-
-
----------------------------------------------------
-
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
-
p: reload proxy configuration
-
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>
-
----------------------------------------------------
-
-
liveconnect: Invoking JS method: document
-
liveconnect: Invoking JS method: URL
-
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@12498b5, refcount=1
-
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@f5da06
-
basic: Loading applet ...
-
basic: Initializing applet ...
-
basic: Starting applet ...
-
basic: completed perf rollup
-
liveconnect: Invoking method: public void test.check(java.lang.String)
-
liveconnect: Needs conversion: java.lang.String --> java.lang.String
-
java.lang.NullPointerException
-
at java.util.Hashtable.put(Unknown Source)
-
at javax.swing.JEditorPane.registerEditorKitForContentType(Unknown Source)
-
at javax.swing.JEditorPane.registerEditorKitForContentType(Unknown Source)
-
at javax.swing.JEditorPane.loadDefaultKitsIfNecessary(Unknown Source)
-
at javax.swing.JEditorPane.getKitTypeRegistry(Unknown Source)
-
at javax.swing.JEditorPane.getEditorKitClassNameForContentType(Unknown Source)
-
at javax.swing.JTextPane.<init>(Unknown Source)
-
at mypack.Main.createAndShowGUI(main.java:84)
-
at mypack.Main.openGui(main.java:238)
-
at test.check(test.java:27)
-
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
-
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
-
at java.lang.reflect.Method.invoke(Unknown Source)
-
at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
-
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
-
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
-
at java.lang.reflect.Method.invoke(Unknown Source)
-
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
-
at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
-
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
-
at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
-
at java.security.AccessController.doPrivileged(Native Method)
-
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
-
java.lang.Exception: java.lang.NullPointerException
-
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
-
at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
-
at java.security.AccessController.doPrivileged(Native Method)
-
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
-
-
any luck in resolving your problem? I have the same exception trace inside of my applet too...
thanks,
Gregory
any luck in resolving your problem? I have the same exception trace inside of my applet too...
thanks,
Gregory
No, I just don't use the interface anymore. Sorry I'm not so helpful too.
any luck in resolving your problem? I have the same exception trace inside of my applet too...
thanks,
Gregory
Hi Gregory! Welcome to TSDN!
We might be able to help you nevertheless if you post the relevant code and (even if it's the same) your stack trace.
Greetings,
nepomuk
Sign in to post your reply or Sign up for a free account.
Similar topics
by: gabryh |
last post by:
Hi,
The following code throws me NullPointerException.
.....
public static boolean isEmpty(String value) {
return ((value == null) || (value.trim().equals("")));
}
|
by: Smith |
last post by:
The program compiled successfully,
but it gives the following error on runtime....
java.lang.NullPointerException
at FrogManiaApp.paint(FrogManiaApp.java:102)
at...
|
by: Ike |
last post by:
I have a signed JApplet which has a JTextArea wherein one can put Jython
Script. Upon clicking a JButton, the script is executed. The script which
executes to code is listed below.
If I run the...
|
by: oll3i |
last post by:
nevermind the previous prob i posted
i m getting further and i get a new exception
in readFile method pleae help me with that one
thank u a lot in advance
java.lang.NullPointerException...
|
by: gezkk |
last post by:
hi,
i m using http proxy service to get proxy and host to applet,
its working fine with jdk1.5 but getting java.lang.NullPointerException in jdk1.6
And the following is mseeage contains java...
|
by: speedygonzalez |
last post by:
Hi all!
I've a pretty naive problem with my applet which is as follows.....
// Wordlist for GRE High Frequency Words
import java.awt.*;
import java.applet.*;
|
by: pradeep84 |
last post by:
hi all,
i'm using the following code and i'm getting
exception in thread "main" java.lang.nullpointerexception at the line which is in bold. help me to solve this problem
import...
|
by: ketand1 |
last post by:
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import java.lang.*;
class DbAwt extends Frame implements ActionListener
{
private...
|
by: sokeefe |
last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that...
|
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
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |