35,618 Topics

Member Avatar for
Member Avatar for aj.wh.ca

Sample code for taking input from Shell demonstrating string and int input For simple programs or testing purpose its not always required to take input thru GUI.

Member Avatar for javaAddict
0
238
Member Avatar for hanntaa

hey guys i was wondering if someone could help, i have to create an address book in java that can add, delete, search as well as import details from a file. so far iv got the GUI down (ish) iv set it over 2 frames, one to edit the data …

0
82
Member Avatar for Beasts

I am taking a Class on Java, and sadly the professor is not all that good. But we have a project to do... I have got to a point where I need to pull info out of an arraylist... But it is an arraylist that is made up of arraylists. …

Member Avatar for Beasts
0
141
Member Avatar for hanntaa

hey guys i was wondering if anyone could help. im trying to add the name, address, home number, mobile number to a JList but i can only seem to save each item to a new line. any help would be great! thanks [CODE] else if (e.getActionCommand() == "Save") { this.details.addElement(this.textName.getText()); …

Member Avatar for Ezzaral
0
103
Member Avatar for P00dle

The line I get an error on is this: [CODE]List accDetails = (List)tm.get(accNo)[/CODE] "tm" is a TreeMap, and "accNo" is a value in it. accNo is a String. I get a build error like this: java.lang.String cannot be cast to java.util.List I have no idea what to do here, I've …

Member Avatar for P00dle
0
185
Member Avatar for glendavis

I wrote some html code that lets the user choose an input from a drop down menu then it is passed into a servlet and that creates an HTML document with the output. How does the servlet get the input from the user. In other words, what code do i …

Member Avatar for Thirusha
0
88
Member Avatar for jeswanth
Member Avatar for Ezwhe

You can call me Ezwhe. I'm a computer science student. I'm acquainted with Turbo C and Java but still has a lot to learn. For me, Java and Turbo C are as exciting as they are challenging. I'll try my best to be active in our forum. More power to …

Member Avatar for Ezwhe
0
94
Member Avatar for fawkman

Hi guys, I am working on a conversion of the Mandelbrot Fractal from Java to C# and my programming skills are lacking quite a bit. I am desperately trying to improve but I have come across some errors that are stumping me. I have attached a txt file with the …

Member Avatar for fawkman
0
657
Member Avatar for egoverbey

I'm working on a program for school and I need to send an array into a method. I have the following in Main: String list = printLine(arrayList[ ]); And the following is the start of the method: public static String printLine(int[ ] a) Why won't arrayList[ ] plug into the …

Member Avatar for kvprajapati
0
40
Member Avatar for P00dle

I want to add a String to a list, but I get the error [B]Type mismatch: cannot convert from String to List[/B] Initially I did it as follows:[code] List accDetails = tm.get(accNo); [/code] and then like this:[code] String conv = (String)tm.get(accNo); List accDetails = conv; [/code] Both have the same …

Member Avatar for P00dle
0
159
Member Avatar for vijay_mca

i have created jar file when i am double click jar file i got error could not find main class program will exit i am setting jar properties file mycomputer->tools->folderoptions->filetypes->jdk->javaw i have created manifest file also i am using windows xp operating system can anybody tell wha t is the …

Member Avatar for kvprajapati
0
89
Member Avatar for gunjannigam

I want to draw a battery meter. For this I am painting my panel with Filled Rectangles using AWT Graphics class. Is it possible that I can add a tooltip so that whenver a mouse is pointed on the top of the rectangle a text is displayed(which will be the …

Member Avatar for gunjannigam
0
648
Member Avatar for nojtb

[CODE]import java.util.Scanner; class ReverseWord { public static void main(String args[]) { Scanner myScanner = new Scanner(System.in); char c1, c2, c3, c4; c1 = myScanner.findInLine(“.”).charAt(0); c2 = myScanner.findInLine(“.”).charAt(0); c3 = myScanner.findInLine(“.”).charAt(0); c4 = myScanner.findInLine(“.”).charAt(0); System.out.print(c4); System.out.print(c3); System.out.print(c2); System.out.print(c1); System.out.println(); } }[/CODE] the code above if you type stop in the windows …

Member Avatar for valy0017
0
271
Member Avatar for gope_biswas

hi every body. i am a new user to this site and i need help from you all regarding installation and running of tomcat3. Can any body give me step by step details of how to install and configar tomcat and then where to save a simple java program containing …

Member Avatar for pragati12
0
246
Member Avatar for skiplatte

Hi, is there a way to read in a file to give a string which is passed to the method without reading line by line? I need to read in something like this... 1 MLRLPTVFRQ MRPVSRVLAP HLTRAYAKDV KFGADARALM LQGVDLLADA 51 VAVTMGPKGR TVIIEQSWGS PKVTKDGVTV AKSIDLKDKY KNIGAKLVQD 101 VANNTNEEAG DGTTTATVLA RSIAKEGFEK ISKGANPVEI …

Member Avatar for P00dle
0
78
Member Avatar for nola_Coder

Well, I just solved the problem I was having. A small and stupid error on my part. If there's a way to delete threads, let me know!

0
65
Member Avatar for hedwards09

Hi all, I have a test tomorrow morning and I'm stuck on this one question on my review and here it is: 1. Write a method that takes an integer n, and returns a String. Assume the integer n is an odd integer between 1 and 9. If the returned …

0
83
Member Avatar for kiranpvsr

Hi...I have created a browser using JAVA. But I cannot access any of the google or yahoo websites. I can access only a few select websites like cs.bham.ac.uk etc.... Can anyone tell me the reason and probably the solution as well..?

0
89
Member Avatar for hanntaa

hey guys, i was wondering if anyone could help, basicly at the moment (for the last few hours) iv been tring to find a way to align an container, to enable me to have my current work on one side (left or right) and a JTextArea on the other. the …

Member Avatar for kinger29
0
166
Member Avatar for johndoe444

HI, From the following code: [CODE] 1 import java.util.*; 2 3 public class t2 { 4 public static void main(String[] args) { 5 List aList = new ArrayList(); 6 7 aList.add("a"); 8 aList.add("b"); 9 aList.add("c"); 10 aList.add("d"); 11 12 List bList = new ArrayList(); 13 14 bList.add(aList.get(1)); 15 bList.add(aList.get(3)); 16 …

Member Avatar for Ezzaral
0
129
Member Avatar for kinger29

I have a java aplpet in eclipse. How do i get my java applet to load in an html web page. I put the .class file from the bin director in the same directory as my web page. I tried applet tag but it gives me an empty white box. …

Member Avatar for kinger29
0
495
Member Avatar for hedwards09

Dear all, I have a test tomorrow and I just wanted to double check on my answer for this review question. Write a method negativePositive that takes an array of integers, and returns an array that contains 3 integers. The first value in the returned array is the number of …

Member Avatar for hedwards09
0
97
Member Avatar for COKEDUDE

Can someone please explain what both of these mean and the good details about them. Please also explain the parameters of how to use it.

Member Avatar for llemes4011
0
457
Member Avatar for bruceaj

I have a GUI window with a JFrame. On this JFrame, I have a JPanel that completely covers the JFrame. I then have another JPanel within this first JPanel that contains a text box and 3 buttons. Within an event handler, I want to expand the JFrame and 2 JPanels …

Member Avatar for AndreiDMS
0
152
Member Avatar for shalabhgarg

hiii can u please help me in uploading files in JSP??? I have a code but it can only upload small sized files(only few bytes or kb) , please help me in uploading large files.I tried to upload a large file but it could not, although it didn't show any …

Member Avatar for peter_budo
0
722
Member Avatar for bruceaj

When I start NetBeans I get a dialog with the following: [QUOTE][B]Cannot locate java installation in specified jdkhome: C:\Sun\SDK\jdk. Do you want to try the default version.[/[/B]QUOTE] I click Yes and everything seems to work ok. Now, I did have the SDK installed but didn't have any need for it, …

Member Avatar for bruceaj
0
171
Member Avatar for geek_till_itMHZ

I need to make multiple action listeners for 4 radio buttons and a regular button. They all need to call different methods from another class I currently have [CODE]Import javax.swing.*; import java.awt.*; import java.awt.event.*; public class CardGameCH15 extends JFrame { public CardGameCH15() { super("Card Game"); add(new CardTable()); } public static …

Member Avatar for geek_till_itMHZ
0
182
Member Avatar for sandeepani

I need to build a simple GIS or map view component for a larger system for my Final Year Project. But I have no prior experience in the field. Therefore I need to add this component as a additional feature only and with the least amount of effort and time. …

Member Avatar for Ezzaral
0
189
Member Avatar for Mehwish Shaikh

Well I was just wondering what should be the first step of making a project(school or professional). Ohkay we've conceived it all. But i just make a garbage of ideas. How to make them bit neat n clear. What shud be the steps, a developer should take before going for …

Member Avatar for Mehwish Shaikh
0
157

The End.