1271 byte By
Octsoul at 2007-9-30 23:29:50
Hi, I'm new to the forums and really new to java and I was wondering if anyone could help me with a simple java program that I'm writing.It deals simply with a smile face that it will change to frown face after 5 seconds and then back to smile face after another 5 seconds, circularly (5 ...
Someone could tell me the scanf in java?and how to declare it in java?thanks....
2487 byte By
Stumped at 2007-9-30 23:30:02
I need to add a for loop to the below code and am not sure if I'm on the right track or not. My assignment requirements state:The for loop should go through the string character by character and count (update the countBlank variable) the characters that are the blank space. public class Count ...
What is the difference between Apache webserver and Apache jakarta tomcat. Which is better for web applications and why?
hinewbieI have written a program with several classes, in one class I have all of my file handling with the correct imports i want to call my read and write methods from another class, I pass a file as a parameter to the method to be read in.When i try to access the method i get an error ...
2399 byte By
rob1234 at 2007-9-30 23:31:07
Hi I have a an algorithm to apply merge sort to doubly linked lists but there is a problem with it that I can't work out. The algorithm sorts the list fine but removes all the values which are less than the first value in the list. e.g if you pass it a list with the values 1,3,2,4,7 it will ...
Hi, I've written this code to display 4 panels but nothing apart my title bar is appearing, I know it;s something minor. I appreciate your help, thanks, fionaimport javax.swing.*;import java.awt.*; import java.awt.event.*; import java.awt.Color.*; public class CDCollection1 extends JFrame ...
i have installed jdk1.5 all my java programs run under jdk1.4 now are not running under jdk1.5 . they give that NoClassDefFoundError exception in main class. why is it so?
624 byte By
ryo149 at 2007-9-30 23:31:35
I have to create a project about drawing program but I have no idea about the program. I really don't know how to allow the user draw the line, rectangle, etc., Moreover user can click any objects that they drawed and then resize it. What is the technology that used in this program ? someone ...
[nobr]I am trying to create a login page which asks for the user's student id and password (login.jsp). It then looks up a database in mySQL to determine whether the login info provided is correct (authenticate.jsp). I've had a go at doing the code for this, but when the login page loads in ...
Basically getting my butt kicked from everywhere..........so please helpI want to use dynamic array which will hold the following:1) Position --String2) NoofPosts -- Integer3) NameofCan --String4) NoofVotes -- IntegerThe user will supply thse four when I run the program.......where the ...
I have these 2 radix sort methods... I want the radixSort(int[] theArray) to return the sorted arraySince this radixSort(int[] theArray) calls another method ... I am not sure how to get the radixSort(int[] theArray) to return the int[].Any help will be really appreciated.public void ...
226 byte By
OG170a at 2007-9-30 23:33:26
HI,my serial port works fine but now I want to send in hex 0xFF over the serial port.How can I do this? Java converts 0xFF into -2 and transmitts two bytes instead of one.Thanks for any help.
886 byte By
Lanexxa at 2007-9-30 23:33:44
Hello, I have a problem with java bean class, which must be reached from JSP page. I have a JSP page:BODY><jsp:useBean id="registrationBean" type="RegistrationBean" scope="session" />..</BODY></HTML> And RegistrationBean class in WEB-INF/classes folder, but when I try tu ...
In the case of an error, I would like to have an error dialog pop up that displays the standard error icon (the one used in JOptionPane), an error message, and (optionally) a scroll pane that contains more detailed information about the error. (For example, a stack trace of the exception that ...
339 byte By
aa11a at 2007-9-30 23:34:04
Am having problem with a "simple set method where I am including a set method for an int I use public void setMember_no_loaning (int mloan);{ member_no_loaning = mloan; }but the complier throws it out saying missing method body, or declare abstract, it doesn't like mloan either.Any ...
I want to create a file for Table 1 with 5 columns of integer numbers in the range of 100, 000 and 300,000. Place 200,000 rows (records) in Table 1. Create Table 2 with 3 columns of integer numbers in the same range and 10,000 rows. I dont want duplicate values in Col 1 of Table 2, they should ...
61 byte By
Aiela at 2007-9-30 23:34:47
Is it possible to run batch files from a java program?
Before I print anything I have a question. When printing and selecting a printer does if no printer is selected does it take the default printer from the computer being used? Our office has over 200 printers and unfortunately this is the first time we have had to print anything. Typically it is ...
3632 byte By
Sharana at 2007-9-30 23:35:00
Hi, the problem I have on hand is to drag a triangle using the Mouse events. I have managed to display the triangle on screen and tried the MouseDrag and MousePressed method calls, but I havent had any luck as yet. I would appreciate if any one could help me out by telling me how to go about ...
371 byte By
midi25a at 2007-9-30 23:35:04
Hi I am a .net developer. Dont boo lol. I am trying to find the latest on Java. I build web apps and would like to use java on the client side. Is there a new form of java for client side code. What do I need to install? Where are some good sites that provide tutorials for Java newbies wishing ...
Im posting a game related post. Please help me out, as I consider myself new to java (and pretty new to programming in general), but I've been dragged and grinded through the materials of a class which now result in the following assignment, which I might add, was due a couple of weeks ...
public static void createTable1(){BufferedWriter out = null;try{out= new BufferedWriter(new FileWriter("c:\\Table1.txt"));}catch(Exception e){e.printStackTrace();}// Generate 5 * 200,000 numbers randomly between// 100,000 and 300,000int rows = 200000;int cols = 5;int myTable1 [][] = new ...
from a java program, how can i access a webpage... in particular its source html? i'm interested in creating a data mining program and am clueless on how to mine the data.once i have the html string or file or however i can access it, parsing through and processing the data i can handle, i ...
hi, its coming up to midnight on the last day i have to do this workso i, the stupid monkey who got myself into this mess need some help...i have this program that is ment to produce a JFrame with a slider and acircle that can grow larger and smaller, this is me teachers code from a workpackwe ...
Hey guys! I am trying to learn Java and continue to get the "Loading Java Applet failed" in my browsers. (I also get the Applet notinited)I have downloaded everything I can think of from Java.com and from Sun.I dont know what's going on.... I have used appletviewer from the Console Mode and ...
2370 byte By
Stumpeda at 2007-9-30 23:36:08
I need to write a for loop that will count the number of blank characters in a string entered by the user. My code is below. I am not sure how to write the for loop or the body of the loop.public class Count {public static void main(String[] args) {String phrase;// a string of charactersint ...
is there any specific logic to parse HTML pages to extract words, word count, font size and other page characteristics?is there any java API to do the above task?i am new to java technology. so i will be happy if anyone answer the above
2711 byte By
CLab999a at 2007-9-30 23:36:55
I keep getting an error saying ; expected on lines 14 and 15, I don't see why that is. My code is below. Any ideas why this is happening, seems strange to me unless I am missing something so simple.// // class to store information// about a Homepackage insy.java.hw7;import ...
I am having this exception in thread main in the following piece of code, please help me resolve it.package course.finl.viqhar;import javax.swing.*;import java.awt.event.*;import java.awt.*;// super class account form which any type of account class can extend class Account extends ...
608 byte By
Garukaa at 2007-9-30 23:37:44
I dodn't know this is suitable for posting here or not,..but..i'm bit new to java. What i want to do is develop a login window to a application where a user must enter valid user name and password for access other functions. database conetion and other stuff is alright. the thing is i want to ...
What are the advantages of java 5.0 than Jdk. 1.4 .
first i'd like thank everyone who responded to my question about just in time compilers. one response mentioned a preferal for managed code rather than dynamic compilation. i think i understand dynamic compilation, but what is managed code and why would it be better?
13813 byte By
Sharana at 2007-9-30 23:38:39
I need help in dragging the vertex of a triangle or just dragging a triangle when the user clicks on it . The code to draw the triangle is as follows. I have used a Polygon and LIne2D with Point2D to draw the lines on screen.Please Help as i have to have this and more stuff done asap. The code ...
Britney Spears is 23 today!
What is Terrell Owen's most important reception, catching 12+ touchdowns or a Desperate Housewife?hurry. i am wanting answer.
How do I get a random number in the range 1000000000 - 4000000000 ?1) I want a different number each time. 2 can be the same but it should not be sequential2) I also want unique random numbersThere is a method in C++ [code]unsigned int rnd_num(unsigned int n){unsigned int r_value, ...
I am very new to programming in general and I am doing an assignment for my programming class at school. My question is how do I use a "Switch/Case" method to include more than one value. Is my "Case" statement correct with Case 94-100? If not, how do I represent more than one case ...
3210 byte By
sam1a at 2007-9-30 23:40:00
A large car dealing company wants to write a computer system to store information about its staff and to perform routine payroll tasks. For each member of staff, the following information needs to be provided: the name, an employee works number (this is a unique 6-digit number) together with an ...
218 byte By
FPOa at 2007-9-30 23:40:21
I'm trying to find out where the user.dir is being set from. Does is actually map to a system variable or is just the directory where the jvm was invoked from? Did some search and couldn't find a clear answer.
what are they used for ...
Hello I am very new to Java I have clock class and I would like to make a Derived class from the clock class here is what I have so far. But I am having trouble understanding how to do this. I looked for some code online but found none. Any hel;p would be greatly appreciated.public class ...
476 byte By
GW04a at 2007-9-30 23:41:15
I have an ArrayList of Class Car and I want to sort the ArrayList into DESC order of each Car's Value field.I have tried implementing Comparator but have had no luck. I've been trying to implement Comparable and have succesfully (I think) changed my Car Class.Now im struggling to work out how ...
774 byte By
kiwioza at 2007-9-30 23:41:26
I need to resize a JPanel using a button or methodWhat I need is to resize a jPanel in a jScollpane so when the panel gets bigger the scollpane with show the vertical scollbarI am using a verticalFlowLayout that has 15 hidden lists so I need to have the jPanelget bigger if the lists are shown.I ...
1803 byte By
_topaz_a at 2007-9-30 23:41:32
Ok... this may sound silly. How do I fetch an object by specifying one of its characteristics?Your typical inspector does the opposite, but is it possible the other way round?In this example x, y are coordinates. Actually the item is associated with an array of the itemID 's (by the ...
I am trying to write to a file 3 columns and 1000 rows with the first column having a unique random number in the range 100000 and 300000..I can generate a random number and check array everytime but is there any better way of doing this? Like a method or something I doono of?
1693 byte By
aa11a at 2007-9-30 23:41:41
I can't get this to work I'm also using a serialized object file to read from but even if I don't reference this and use the output when a button is pressed as text only then nothing appears in the text field when the button is pressed. I 've checked this and checked this and can't see ...
Hi, I'm new to java programing and I need to figure out how to print text backwards....(Forgive me if this is really easy)Example: Input: A red sun risesOutput: rises sun red AAny help on this would be greatly appreciated. Thanks.
How can I write something so that the value of a variable is the first occurence of another string, or just a word or something. Say I had variable ABC as "All people are nice" and I wanted to have variable CBA represent the first occurence of"eop" , how can I write that?
4219 byte By
Stumpeda at 2007-9-30 23:42:46
What the heck is causing my unreachable code error on the below code at line 74 right after my break statement ending the switch at the line "SOP ();"?public class Count {public static void main(String[] args) {String phrase;// a string of charactersint countBlank;// the number of blanks ...