1,034 Posted Topics
Is it possible to print wirelessly from a laptop with a linksys g card? I do have a router but not a print server, so i dont know if this is possible or not. If it is, could someone tell me how to do this? | |
Re: [QUOTE=vyk2rr]Excuse if it needs to the respect Sir perefeccion, my intention is not to fight, and will forget this, I am here with a different intention this. Greetings perfect Mr.. Excuse it needs the respect. haaa, and or callate, that bothers the people with that character, Perhaps you are created … | |
I keep getting a null pointer exception with this code: It's suppose to load a text file into a textArea. [Code] JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showOpenDialog(this); String getFile = chooser.getName(); if(returnVal == JFileChooser.APPROVE_OPTION) { try { FileReader filegetter = new FileReader(getFile); BufferedReader br = new BufferedReader(filegetter); … | |
Re: I think it might be best if you post the code you have so far. I think I might understand what your saying but I'm not sure. | |
When I'm in linux(mandrake 9) I cannot use the touchpad on my laptop but I can use the mouse. Anyone know how to make it to were I can configure it for my touchpad? ![]() | |
Re: I think you could use something like this: [Code] textField1.requestFocus(); [/Code] | |
Re: The finally clause executes wheter or not an exception is thrown. Except when a catch clause invokes System.exit() of course! | |
Re: I think the easiest way to do this is to use substring(). Like so... [Code] import java.io.*; class MessageBoxInput { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String inData; System.out.println("Please input a 4 digit number"); inData = br.readLine(); int int1 = Integer.parseInt(inData.substring(0,1)); int … | |
Re: Your question is somewhat unclear. But maybe I got it right. I posted code what I thought you were wanting if it's not let me know... [Code] import java.io.*; class NumbersandInput { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String inData; int i; … | |
Re: If it were me I would use an if-elseif-else statement rather than switch-case. [Code] import java.io.*; public class ifelsechain2 { public static void main(String[] args) throws IOException { String string1; int num1; InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); System.out.println("Enter a Grade: "); string1 = br.readLine(); num1 … | |
Re: Something like this? [Code] class ArrayOfInts { public static void main(String[] args) { int[] myNums = new int[20]; for (int x=0; x<20; x++) { myNums[x] = x * 5; } for (int y=0; y<myNums.length; y++) { System.out.println("myNums[" + y + "] = " + myNums[y]); } } } [/Code] | |
Re: Here is how to reverse an inputed string, just apply it all to Int and you should have your program: class ReverseString [Code] public class ReverseString { public String reverse(String arg) { String tmp = null; if (arg.length() == 1) { return arg; } else { //extract the last char … | |
Re: [QUOTE=Narue] lazy bobo.[/QUOTE] Thats a good one. I like that. | |
I really like to play chess and thought about trying to actually make a chess game. Only im not sure were to even start. If anyone in here has ever done this can you give me some tips on how to get started and how difficult of a task this … | |
Re: Did you save the java file in the right directory? Also have you set the classpath and stuff like that? | |
Re: What do you mean you want to have a menu? Are you meaning a graphical menu, because your program looks like it runs at the command line. I think what you meant is you want something to list the available units of measure or something, if so let us know. | |
Re: It would have helped to have the code posted but I'll post some code with the bufferedReader that does work to hopefully help you... [Code] import java.io.*; class Poop { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String inData; int count = 0; … | |
Re: Like someone stated above you should post the areas in which are causing you trouble. If it's just the basic structure of IO, or you dont know how to get the ASCII value of characters, or something else let us know. But you should never post and ask someone to … | |
![]() | Re: Im not sure that a do-while loop is the best way to go about this, might be though. Right now I dont have time to fix it but I can a little later. ![]() |
Re: Im positive they got a tutorial on this at java.sun.com | |
Re: what exactly are you needing help with? | |
I made a program that simulates the roll of a six sided dice. I had my program return a random number between 1 and 6. The weird thing is I get 4 like 6 out of 10 times each time I run the program. So is the random number genarator … | |
Re: You have alot of conversion problems that need to be fixed. But even when they are fixed the program doesnt really work the way you have it. If you want to convert the input to a double do something like this: Double d = Double.valueOf(BufferedReaderVariableName.readLine().trim()); double d2 = d.doubleValue(); | |
Re: what exactly are you looking for in the game? | |
Re: [QUOTE=tablet]i unable to read a text file into my code i have the right code i think i just can not make it run with no errors[/QUOTE] can you post the code? | |
Re: This isnt exactly what your looking for but it should give you an idea of how it kind of works. I hope this helps a little... [CODE]import java.io.*; class Grade { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String inData; double grade = … | |
Re: You can always play a sound from a file like this: [CODE]import java.awt.*; import javax.swing.*; import java.applet.*; import java.awt.event.*; import java.net.*; public class Sound extends JFrame implements ActionListener { AudioClip song; public Sound() { super("Sounds"); setSize(200,130); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container pane = getContentPane(); FlowLayout flo = new FlowLayout(); pane.setLayout(flo); JButton btn = … | |
This is just a general question. I was wondering how you can make programs compile and run quicker? Does it have to do with the primative type you use or what? | |
I have been working on TicTacToe for some time now. I just now got it to work but it's not working properly. When somebody gets three in a row a label is suppose to show that a player has won but it does'nt. So I cant figure out why it's … | |
Has anyone taken the AP Computer Science course in high school taught in Java? if so can you tell me how hard it is and all that stuff? Even if you took the course taught in a diffrent language i would appreciate if you would tell me about it. Thanks … | |
Why would my 56k modem be connecting at 12k and 18k? It has been doing this for about 2-3 weeks. Any ideas? |
The End.