32,204 Topics
| |
I have a program to write in which I need to create the following fractal pattern using recursion: [img]http://img19.imageshack.us/img19/7456/73284540.png[/img] ^image link My professor said two recursive calls are needed, and 2 parameters are also needed. One parameter indicates the indentation of the leftmost line, while the other indicates the number … | |
Pls assist me in graph programming in java, how to draw graphs, scale graph and other stuffs of graph | |
Write a class, TimedInstantiation, which will have a toString method which returns a string of the following form: I was instantiated on 12 June 2008, 35 seconds after the previous instantiation of me. if there have been previous instantiations, but if not (that is, if we are dealing with the … | |
When I try to print data to a file, I am getting an error dealing with security saying that I don't have permission to write to a file. Can anyone help me out? Here is the code //import packages import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.*; import … | |
I the program I wish to run is a search for a number in 4 threads. Its working out fine and here is the code. [CODE] import java.lang.Math; import java.lang.Thread; public class NumberFinder { public static void main(String args[]) { int target = (int) (Math.random()*1000); System.out.println("The number is " + … | |
Hi, I want to learn spring,strut,hibernate... where i get simple and good tutorial for beginners. which framework /tools/IDE to download. or books .. what other basic language needed to learn like to learn c++ background of c please give me all details?? Thank you | |
I am having a difficult time with this one line of code for my homework that is due Sun.: Modify the Inventory5 Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item … | |
The programming assignment is to implement a class Purse. A purse contains a collection of coins. Each coin object must contain its name. You should not put a limit on the number of coins that a purse can hold. This program should provide the user with the ability to display … | |
I'm trying to figure the topic out. To begin, lets say I have different sets of points in a file with the following format: 2 //1st number represents number of points within set 3, 4 //following lines are points 5, 6 3 3, 4 5, 6 6, 2 ..etc I … | |
I am trying to execute this program, but I am getting errors this is the code [CODE] import java.util.*; public class DateUtils { static final int MILLS_IN_DAY = 24*60*60*1000; public static Date getCurrentDate() { GregorianCalendar currentDate = new GregorianCalendar(); currentDate.set(Calendar.HOUR,0); currentDate.set(Calendar.MINUTE,0); currentDate.set(Calendar.SECOND,0); return currentDate.getTime(); } public static Date createDate(int year, … | |
How do I creat one in JAVA? Is there a tool I can use in netbeans? thanks a lot.. | |
Just a quick question. No rush to answer, it is not important, I might discover it later myself, but just in case someone knows it: I have been trying to create a [URL="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html"]Method[/URL] object using this method: [URL="http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getMethod(java.lang.String,%20java.lang.Class...)"]Class.getMethod(String name, Class<?>... parameterTypes)[/URL] like this: [CODE] obj.getClass().getMethod(methodName, Class.forName(methodType)) [/CODE] My problem is … | |
HI.. Is there any tool available for creating an installable version of my web application which will ask for to bind tomcat , mysql with my application. So my final exe wil contain my web application,tomcat and mysql related files. | |
How can I check if an event is user generated? When the user clicks on a combo box and changes the displayed/selected content, I want the code in the itemStateChanged method to be executed. But I only want this code to be executed if the method call was due to … | |
Hi, I have been spending several weeks figuring this out but couldn`t find way to it. Here is what I am planning to do, I have a text file with several data in it, and I have to extract part of the data into a 2 dimensional array. Here is … | |
[CODE=Java]java.util.Vector<EmergencyContacts.ContactInfo> contacts = Application.getPatient().readEmergencyContacts().readContactInfos(); for (int i = 0; i < contacts.size(); i++){ EmergencyContacts.ContactInfo info = contacts.get(i); } public Vector<ContactInfo> readContactInfos(){ return contacts; } private Vector<ContactInfo> contacts = new Vector<ContactInfo>(); [/CODE] As you can see, it returns a Vector of ContactInfo. Why would I be getting an error saying, "Exception … | |
Hi All. Please I need your help. I have just started work as a Software Engr. I have a project at hand which includes placing different image icons on a JLabel component depending on which element of a JList is selected. I used single selection model. I tried using if-else … | |
Hello all, I have an curious situation here: Let's say there is a web site using java applets (a very old one with all graphical primitives written from scratch). The problem affects several out of many machines (all Windows) connecting to the site. The problem is that when I open … | |
New to daniweb. How do I find a card game written in java @ daniweb? Thanks in advance | |
hi..... im trying to run c,c++ programs in linux using java code..... i have compiled the program and the .out file is also created.... im using the following code... [code] ProcessBuilder pb = new ProcessBuilder("gnome-terminal","-e",home+"/MyProjectFiles/"+filename+".out"); Process p = pb.start(); [/code] the problem is the terminal starts and closes after execution.... … | |
I'm reading in a file and I need to skip any lines of length zero or starting with '#'. But I keep getting null pointer exceptions later in the code because it can never tokenize. What am I doing wrong? Thanks in advance. Below is the relevant method: [code] static … | |
[TEX]I[B] am having a problem with my code it seems to endlessly loop with user input of two temps never ending. As I am a newbie at this could someone take a look at what I've got so far and fix what's wrong here are my two classes This is … | |
The following method should swap the high nibble in a byte with the low nibble in a byte. The following code dosn't work if the lower nibble is above 0111 if it is it returns a negative number... Does anyone know what im doing wrong ? [CODE] public static void … | |
Hi I am using mozilla to test my application. I tested two subscription of my application in two different mozilla browsers simultaneously. Here I Found details are swapped. Because mozilla using the same Session ID for the two browser. This is a flaw in mozilla or whether this issue is … | |
I want to develop an application. It should send my data base data to my mobile cell how can i do this. please help me -------i need the books and i need the location where i can get this application related info Thank you | |
Hey everyone, I am new to Java and I use NetBeans to do programs. On my latest project I am attempting to code a program to read a input text file of format. ie. Attend class: 0 120 -one time event Push snooze on alarm: 0 1 3 5 - … | |
[CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class LoginScreen extends JFrame { JLabel userId; JTextField userIdT; JButton userIdHelp; WelcomeLogin welcome; public LoginScreen() { super("User Login Screen"); Container surface = getContentPane(); setSize(1024,750); setDefaultCloseOperation(EXIT_ON_CLOSE); setLocationRelativeTo(null); surface.setLayout(null); welcome = new WelcomeLogin(); surface.add(welcome); userId = new JLabel("User ID :",JLabel.LEFT); userId.setBounds(20,50,80,20); surface.add(userId); userIdT … | |
hiiiiii friends actually i m implementing binary tree in java,i have done this by passing node,but i want to do same usin array method,please help me .i have to do this within two days | |
Hi everyone, I need your help on deciding what type of mobile game should I create for my project, I will also need help on how to create a mobile game from scratch if anyone has good source such as website or books please let me know I will really … | |
Hey, Does anyone know how I can draw lines between the textfields? If I ask for x and y then this is relative to the component itself.. Also now I have made a separate class but this means that when I draw the lines the textfields disappear they cannot exist … |
The End.