12 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for deolalkar_pooja

Hello to all, I have following simple Applet program. import java.applet.*; import java.awt.*; public class myapp1 extends Applet { Label l1, l2, l3, l4; TextField t1; TextArea t2; Checkbox c1,c2,c3,c4,c5,c6; CheckboxGroup cg; Button b; public void init() { l1=new Label("Enter your name: ", Label.RIGHT); t1=new TextField(20); l4= new Label("Enter your …

Member Avatar for deolalkar_pooja
0
249
Member Avatar for teppuus

Hello, I am trying to create an MDI application and am having problems with one of the frames. Walking through the errors, the first error points to a list generated by Netbeans code that I think is the null problem. When I look further down the error list, I get …

Member Avatar for JamesCherrill
0
1K
Member Avatar for leiger

This code works perfectly fine when I run it as a class file (the font is located in the same directory) - however when I package it into a JAR file it can't find the font and the program crashes. The font is definitely being included in the JAR archive, …

Member Avatar for karlmeier
0
4K
Member Avatar for nickecarlo

I can't figure out why I get the NullPointerException on Line 223. Would appreciate any help whatsoever. Sorry about the spacing below. Some of the code appears messy. Toggle Plain Text and it should look better. [CODE]/* Section 1: Import Statements. Imports the Scanner class and the IO Package. */ …

Member Avatar for nickecarlo
0
215
Member Avatar for shibu2all

Can anyone please help me out in removing this error Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1045) at java.awt.Container.add(Container.java:365) at Client.<init>(Client.java:33) at Client.main(Client.java:17) [CODE=java] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; public class Client { JFrame frame1; JList list; JList list1; JTextField tf; JButton send; JButton lout; …

Member Avatar for shibu2all
0
229
Member Avatar for SMITA6076

I have two classes. The first class is called [ICODE]EmployeePayRoll.java[/ICODE] (this compiles fine) and the second is called [ICODE]TestEmployeePayRoll.java[/ICODE] (this does not compile). The trouble I'm having is that I'm trying to pass in methods as parameters when I instantiate my objects in the main method of the test class. …

Member Avatar for SMITA6076
0
291
Member Avatar for manish250

Hello all I am using reading a config file in which there is a entry [CODE]code_list="515,522,560,000" [/CODE] while i am reading this string in my java application and using split on it and then assigning it to a string[].it is giving null pointer exception.needed code is as follows [CODE] static …

Member Avatar for manish250
0
2K
Member Avatar for manish250

Hello all can anybody tell me why i am getting null pointer exception. [CODE] String mesg=""; try { URL u = new URL(strOp); BufferedReader r = new BufferedReader(new InputStreamReader( u.openStream())); String s=""; while((s=r.readLine())!=null) System.out.println(s); if(s.equals("SUCCESS")) mesg = mesg+"Your Request has been Processed.you will be intimated by a sms soon"; else …

Member Avatar for manish250
0
176
Member Avatar for Sunshineserene

Hi all, this is my codes. [CODE]import java.io.*; public class Testing3 { static double[][] mydouble; static int a, b; static double d; static String[] temp; public static void main(String args[]) throws Exception { try { BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Serene\\Documents\\Major Project\\Alignment Algorithms\\Testing2.txt")); //reading files in specified directory String str, …

Member Avatar for Sunshineserene
0
2K
Member Avatar for pi_lord12

I am creating a game in which I import images from files to represent characters, etc. I have created a class called Contents which represents anything that can be placed on a tile of the gameboard. A subclass of Contents (by several levels) is Wizard, to create a wizard character. …

Member Avatar for pi_lord12
0
143
Member Avatar for InsaneOstrich

I have to write a JUnit test method for a short program that lets the user add/remove/browse images in a collection. (Adding an image is done with a JFileChooser) The test method that I wrote exhibits some really bizarre behavior; it passes every so often, but fails most of the …

Member Avatar for InsaneOstrich
0
543
Member Avatar for keicola

I'm trying to read a file which contains: Dante Beatrice 3 5 and put them into an array. Then I will assign the values of each member of the array to static variables. when i run the main class of my project, it throws a NullPointerException starting from the line …

Member Avatar for keicola
0
236

The End.