36,051 Topics

Member Avatar for
Member Avatar for zyaday

Following me everywhere? why do I get those exceptions very much??? why are they raised?? My classes are always in the same package as the class they accesses them.. I know they are there. Why doesn't the compiler find them???? thanks for your help ppl...please help :@

Member Avatar for zyaday
0
94
Member Avatar for tones1986

Hey all - I have to create a basic client browser that creates a socket with a webpage and then uses a command similar to : GET index.html\r\nHTTP/1.1\r\nHost: [url]www.mysite.com\r\n\r\n[/url] To get the source code for the website. I will store each line recieved from the server into an arrayList, which …

Member Avatar for Ezzaral
0
102
Member Avatar for losh177

Hi, I'm having some problems with an infinite loop. For some reason, the process 112 is not being send anywhere. What i'm suppose to to do is to mimic a CPU. Each line represents a process which the first number is the machine time that it suppose to be send …

0
133
Member Avatar for handrews3583

I'm working on a program in which I am using the BorderLayout Manager. However, I'm having a difficult time changing the size of the window. I want to make it longer and more narrow, with only one or two text fields per row and want to make the text field …

Member Avatar for Ezzaral
0
142
Member Avatar for rast1940

Hello, I need to read in objects from a binary file and place those objects into an ArrayList. Not sure on how to go about adding the objects - this is what I have so far: [CODE]ArrayList<MailingLabel> arrayOfMailingLabels = new ArrayList<MailingLabel>(); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream("labels.dat")); while …

Member Avatar for jwenting
0
107
Member Avatar for miguelms19

Just need a few pointers with the code below. I have the below class to complete but I am stuck on the isAllValidDigits() method where i have to create a loop to check and return true if all the int values of the authorId array and the programId array are …

Member Avatar for vchandra
0
91
Member Avatar for skyzer

im creating little program which produces cars, tractors and mopeds. car has 4 wheels and 4 cilinder engine, tractor has same, and moped has 2 wheels and 1 cilinder engine. this is what i have at the moment. next thing i need to do that with 2 factories.. home factory …

Member Avatar for skyzer
0
167
Member Avatar for whimsical1987

Hi, I have to do a project on Sudoku. I am finished generating the complete board. Now my major task is to generate a puzzle out of the complete board with the difficulty level. Can some one give me clue to remove the elements randomly from the board. Later on …

Member Avatar for whimsical1987
0
128
Member Avatar for JimD C++ Newb

Hi, I have a rather large binary file that I am attempting to read in, but I only want to read in the first 100 characters or so. I've tried searching the internet for help or an example, but I've only found examples that read in the entire file...and this …

Member Avatar for balmark
0
111
Member Avatar for rje7

I am trying to change the look of the jsp/servlet pages dynamically based on the device from which the request comes. i have done the part of how to identify the devices from which the request arises. but stuck at the part where i should change the css sheet. is …

Member Avatar for jwenting
0
71
Member Avatar for jaque322

hi iam programming bisection method in java but i dont know how to evaluate functions if someone can tell me a class to do it function y=3sinx +cosX example f(a)f(b)<0

Member Avatar for harsh2327
0
59
Member Avatar for vij123

i am calling a JSP from a servlet but i am getting a error Error 404- Not found. Servlet file is reside in E:\Simple\WEB-INF\classes\servlet folder. ServletHome.java [CODE] package servlet; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.net.*; public class ServletHome extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, …

Member Avatar for rahulrinayat
0
173
Member Avatar for moone009

Im running windows XP Professional I have all of the latest updates on my laptop and I just downloaded the latest version of SQL Developer but when I try to open the program I receive this error “Unable to create an instance of the java virtual machine.” Ive been looking …

Member Avatar for debasisdas
0
79
Member Avatar for Ajantis

Hey folks :) I was writing some code today, and I wrote a function for computing factorials without use of recursion. What do you think about this one? [CODE]int factorial(N) { int r; r = 0; while (N > 0) { r *= (n-1); n--; } return r; }[/CODE]

Member Avatar for jwenting
0
303
Member Avatar for sinister747

Hi All, I am pretty new to Java and i am having difficulty using overloading on the [I]equals[/I] and [I]compareTo[/I] methods. I have a sample application for a school and i need to check for duplicates in records using the equals and compareTo methods. All records have Firstname, Lastname and …

Member Avatar for sinister747
0
106
Member Avatar for isaac4luck

Hi, I am quite new to Comp Sci and I just wrote a program in BlueJ that calculates the value of truth tables and validity in arguments. I followed the book's instructions and have a method with the signature: (It's in the class "Main") public static void main(String[] args) { …

Member Avatar for jwenting
0
167
Member Avatar for neti1987

Hi! I try to create HashSet of the next object: [CODE] import java.nio.file.Path; public class WatchedPath { public Path dir; public boolean recursive; public Filter filter; // Ctor with only Path - for comparing between the object (comparing is only by the path!) public WatchedPath(Path dir) { this.dir = dir; …

Member Avatar for neti1987
0
2K
Member Avatar for saggykulji

1. Create a doubly linked circular list in Java. Each element in the list contains a data which is an object of a Student class and two links, next and previous. 2. The Student class contains two class fields only: • name - The first and last names are in …

Member Avatar for peter_budo
-2
127
Member Avatar for Bobon

Hey lads, Just have a small query here thats really bugging me. When details are entered by user and checked in database, the program should display one of two messages as seen below. When the details are entered correctly the welcome message displays correctly. However, when incorrect details are entered, …

Member Avatar for Bobon
0
146
Member Avatar for saggykulji

suppose i created a dequeue class, with methods like insertFront() insertRear() removeFront() removeRear() peekFront() peekRear() isEmpty() isFull() how can i wrap it around and array ?? Will it work the same way as circular does?

0
65
Member Avatar for Alianncox

Hi, I get this error: `Exception in thread "Thread-4" java.lang.NullPointerException` When I try to send the vector to my form. Does someone knows where I made a mistake? Here is a part of my code: (this part is from my clientapplication (where I make a connection with the server) if …

Member Avatar for Alianncox
0
83
Member Avatar for mitsuevo

Hi i'm implementing a small java program where we have the game running in an applet. After each turn I want the applet to reset to the original setting for the next turn. Basically the game is a football being kicked into the goal. After the goal is made/missed the …

0
56
Member Avatar for jackrobert

I am new one for jsp and web developement... if i click back arrow in navigation toolbar (from any page in my application) ,then go to logout page... For example.... Suppose i am in page4... here i click backarrow in browser then i want to go logout page, don't go …

Member Avatar for jwenting
0
117
Member Avatar for acdougla17

I am trying to basically use the methods as functions and then call them in main but I cant figure it out. I thought it could be done like this but maybe I am just confusing my php&mysql class with Java. At the bottom of my code, there is a …

Member Avatar for stephen84s
0
169
Member Avatar for eswaramoorthy

I am new one of jsp .i have developed simple webapplication using jsp... Step 1 : I have one login page : (contains username ,password and sumbit button) Step2 : I have one logout page : it has one link (Go to login page), just u click this link go …

Member Avatar for jwenting
0
140
Member Avatar for johndoe444

[CODE]// this is overkill Date now = new Date(System.currentTimeMillis()); [/CODE] Why is this overkill?

Member Avatar for jwenting
0
145
Member Avatar for harshareddy75

Hi all, I have a web app and in the web.xml file there is a filter which is applied to all the jsp files. However I need to change the particular filter so that it is not applied to 1 jsp file. I tried searching in regular patterns if there …

0
33
Member Avatar for Colin454

Hello, apon summing the rows of a two-dimensional array how can you put the results into a new 2D array so that the results can be sorted from largest to smallest or vice versa? we started with a 7 column 8 row array and now want a two column 8 …

Member Avatar for vchandra
0
85
Member Avatar for k2k

I had done a program with JFrame a year ago and I am trying to convert it to with JApplet so I can put it on the web. So far so good and I am able to see the applet and seems every functions are still working... there is one …

Member Avatar for k2k
0
198
Member Avatar for chrisb76

I am having problems setting up drop down menue for a application I am trying to do for a class. Can someone please give me some pointers. Here is the class assignment. Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage …

0
48
Member Avatar for mikeyboy02

Hi I'm new to java and working on a program where I want to show the number of rentals for one person in one box and the total rentals in another box. I am having trouble storing the variable or it is not recognizing that I want to keep adding …

Member Avatar for mikeyboy02
0
109
Member Avatar for pateldeep454

I am having error in the following code. What should I do to fix it? Also, how should I call it in main method to test the code? please HELP :( [CODE] package sortingelements; public class Main { public static void main(String[] args) { } public int indexOfMaxInRange (int[] myArray, …

Member Avatar for Danny_501
0
124
Member Avatar for VernonDozier

Hopefully this is fairly basic. I've never used enumerated types in Java. I'm sort of trying to take my C concept of them and make it work in Java. Basically use them as constant integer values. That might be putting the square C block into the round Java hole. I'm …

Member Avatar for VernonDozier
0
145
Member Avatar for seacase

I seem to have hit a wall with implementing my own version of merge sort. I can sort the list fine in ascending order, but once I try to reverse the ordering (passing in a boolean), I get an ArrayIndexOutOfBounds error. I'm guessing that what I'm experiencing is some sort …

0
46
Member Avatar for eggmatters

I posted this on Oracle Forums to the sound of crickets chirping. This question entails more Oracle specific tasks then java but since my code is in java, here goes" Hello, I have a java package where I am attempting to implement a database Change notification registration and listener. I …

0
156
Member Avatar for jaredleo999

public class Welcome extends JFrame { private Toolkit toolkit; private static String passy = "123456"; public Welcome() { setSize(300,550); setTitle("Welcome"); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel panel = new JPanel(); getContentPane().add(panel); panel.setLayout(null); JLabel label = new JLabel("Enter Password"); JPasswordField password = new JPasswordField(6); password.setEchoChar('*'); password.addActionListener(new AL()); label.setBounds(0,0,300,25); password.setBounds(100,0,200,25); JButton b1 = new JButton("1"); b1.setBounds(0,100,100,100); …

Member Avatar for jaredleo999
0
648
Member Avatar for teen-omar

Hey guys, I'm stuck at a problem. Check out the code: [CODE]import java.util.*; class testAll { public static void main(String[] args) { Scanner input = new Scanner(System.in); ArrayList pointsArray = new ArrayList(); ArrayList linesArray = new ArrayList(); System.out.println("Enter amount of sides: "); int sides = input.nextInt(); if (sides <= 2 …

Member Avatar for teen-omar
0
282
Member Avatar for anjal_pawar

On line no 1 there are 1 star On line no 2 there are 3 stars On line no 3 there are 5 stars On line no 4 there are 3 stars On line no 4 there are 3 stars On line no 5 there are 1 stars * *** …

Member Avatar for javaAddict
0
124
Member Avatar for scratchwiz

[CODE]private void eaddbtnActionPerformed(java.awt.event.ActionEvent evt) { if(eaddbtn.getText().equals("Add")){ eaddbtn.setText("Save"); eupbtn.setVisible(false); // edeletebtn.setVisible(false); ecanbtn.setText("Cancel"); } else{ Enrollment e = new Enrollment(eid_txt.getText(),ecode_txt.getText(),egrade_txt.getText() , emarks_txt.getText() ); // ERROR APPEARS IN HERE e.SaveEnrollment(); } } [/CODE] i want to add int value to mysql database...how can i do that? how to convert int value to string …

Member Avatar for scratchwiz
0
148
Member Avatar for selenask

I need to write a program that displays 50 priome numbers . I need to use a stack to store prime numbers.This is what I hava so far I need some help Please. My while loop is weird

Member Avatar for BestJewSinceJC
0
57
Member Avatar for beginner233

Okay I have managed to finish everything. However, my output for average minutes and average hours is wrong for some reason. I have looked over my code multiple times and I cannot figure out what the problem is. I would appreciate any help. Here is my code. Can you tell …

Member Avatar for BestJewSinceJC
0
84
Member Avatar for nikolaos

I have a public class change which holds the private static int [B]commonresource[/B] and the methods : public synchronized void [B]increment[/B](int inc) public synchronized void [B]decrement[/B](int inc) to handle the variable commonresource I have a main class which starts 2 new threads "nikos" , "fosses" with a constructor that takes …

Member Avatar for JamesCherrill
0
113
Member Avatar for wishk

hi guys , i am trying to use flex in java , can any boday help me guiding it . and how to send data safely to server

Member Avatar for masijade
0
57
Member Avatar for luvthug

I am having problem with the following code `public void grow(int size)`, can't seem to get it working import ou.*; import java.util.*; /** * Class DiscoLight * This class uses the Circle class, and the Shapes window * to simulate a disco light, that grows and shrinks and * changes …

Member Avatar for drohnwerks
0
590
Member Avatar for rena0514

my previous button does go to the previous file: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class StudentAddress extends JPanel { private JButton submit, clear, next, display, previous; private JLabel first, last, street, town,state, zip; private JTextField fName, lName, hStreet,hTown,hState, hZip; private int studentCount=0, displayCount=0, i; //studentCount …

Member Avatar for moutanna
0
103
Member Avatar for leena_patra

i am trying to make ajax call to a jsp and setting up a few variables using(retrieved from the session) # delimiter using out.println and then use this variable in the response object of onSuccess call back function. and then i have to remove that from the session. But if …

0
67
Member Avatar for gunjannigam

I have a 2D image of a map. What I want to do is 1) Paint this image in a 3D Canvas. And then rotate it with the help of mouse 2) Secondly do some path planning, i.e If I select 2-3 points in space on top of that map …

Member Avatar for cmliu2004
0
84
Member Avatar for brechtjah

Hello everyone I'm currently following a course "Game Development" where we learn everything from design to 3d drawing to programming. The language we use is C++, however I'd like to learn Java as well and have there for decided to create a large project (together with a number of other …

Member Avatar for cmliu2004
0
160
Member Avatar for beginner233

Hey guys, how would I happen to utilize a System.out.printf statement to make three columns with the three headings.

Member Avatar for jwenting
-1
130
Member Avatar for peter_budo

I running my little blog on Tomcat 6 server. My hosting company allows me to set up multiple sub domains. I was trying to do for last few hours, but no luck. Having started with [code=xml] <Engine name="Catalina" defaultHost="mydomain.co.uk"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="mydomain.co.uk" appBase="/home/user/public_html" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Alias>www.mydomain.co.uk</Alias> …

Member Avatar for peter_budo
0
1K

The End.