754 Posted Topics

Member Avatar for kriskarrera

Turn off the PSU. Then, while holding the power button in on the case, switch the PSU back on. This sort of jump starts some PCs that I've worked on and usually works. If not, do you have another PSU you could test the machine with?

Member Avatar for Phaelax
0
149
Member Avatar for silentcreeper

For reading the file: [code] File file = new File("C:/myFileHere.txt"); BufferedReader in = null; try { in = new BufferedReader(new FileReader(file)); String line; //loop through each line in the file while ((line = in.readLine()) != null) { //split line up by any words separated by a space String[] words = …

Member Avatar for Phaelax
0
160
Member Avatar for carver

Are you disengaging the connection with the USB device before exiting? With USB flash drives, the OS likes to complain sometimes if you remove it without properly "ejecting" it first. This could be a similar issue. I'm just taking a guess here. Are you able to test it on other …

Member Avatar for carver
0
179
Member Avatar for Phaelax

How can I use this in Java? I don't need to run a server, just call some functions from an existing one. I haven't found much "useful" documentation on this.

Member Avatar for Phaelax
0
93
Member Avatar for jakeneff

I swore there was some sort of text justifiers added in 1.5 but I can't seem to find what they were. It's really not hard to create your own method to pad and align text. [code] public static String padAlign(String string, int fieldLength, char padding, boolean alignRight) { int length …

Member Avatar for jakeneff
0
1K
Member Avatar for prettykitty

You could probably afford the new Pentium if you don't spend so much on that Raptor drive. But I can't fault you for wanting to keep it! Definately make sure you get a trustworthy PSU with a good efficiency rating. Many people will often overlook the quality of their PSU …

Member Avatar for Phaelax
0
129
Member Avatar for Phaelax

Got a friends Dell Inspiron 4000 laptop. p3 700mhz 256mb ram Win XP Before windows can even load, it displays the following: The amount of system memory has changed. F1 to continue or F2 for setup Windows loads just fine passed that point. (as well as can be expected on …

Member Avatar for Phaelax
0
107
Member Avatar for cvr-grl

[quote] familiarize yourself with the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html"]ArrayList[/URL] class though (you'll have to use the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"]Integer[/URL] wrapper for this).[/quote] Doesn't 1.5 have autoboxing? (I still use 1.4 so I'm not sure)

Member Avatar for jwenting
0
103
Member Avatar for Comtek1980

Care to tell us the errors you're receiving? Took a glance at it, oh where do I even begin. What's this? sortProductName( productName ); Unless its returning a value and assigning it to something, you have to put it inside a method or constructor. This, too, can not be outside …

Member Avatar for Phaelax
0
53
Member Avatar for scoobie

Can't you just add a MouseListener to the table then use .getSelectedRow() and retrieve the value of that row from your TableModel?

Member Avatar for Phaelax
0
132
Member Avatar for rangaSL

Why are you using the icon of a JLabel to display a checker piece? Use an Image and override your paint method.

Member Avatar for Phaelax
0
69
Member Avatar for im4tion

Tokens? If you're using StringTokenizer, don't. Use the .toCharArray() method that hooknc mentioned. Loop through each character using a FOR loop and determine if it's either a letter that should be changed or a symbol that should stay the same. You can do this by checking the characters' ASCII value. …

Member Avatar for Phaelax
0
123
Member Avatar for rangaSL

You can connect the two clients by using Socket and ServerSocket classes. Your ServerSocket would listen for incoming events. Basically, the only thing each client has to listen for a "playerMoved" event. Update the opponent's position on your side. Each client should handle the logic of the game. So if …

Member Avatar for Phaelax
0
260
Member Avatar for Phaelax

Wasn't sure where to post this at, so I stuck it here. Anyone know how to prevent AIM from taking focus when a new message pops up? It's quite annoying when you're typing in one window, then suddenly typing in a new window. Or having a full screen application minimized …

Member Avatar for Phaelax
0
208
Member Avatar for thnass

Cruzer should have some kind of partition application on their website for their flash drives.

Member Avatar for fry
0
111
Member Avatar for scoobie

Shouldn't this: if(array[middle]==(searchItem)) be this: if (array[middle].equals(searchItem)) If the length of the hash code is the same for all entries, then you should be able to determine the amount of bytes you need to skip. [code] //8 characters plus 1 line-terminated character (\r, \n) int lineSizeInBytes = 9; //line in …

Member Avatar for Phaelax
0
975
Member Avatar for aman_dce
Member Avatar for DMR
0
360
Member Avatar for med7at7egazi

Getting ready to graduate and doesn't even know what the final project is about. Good luck.

Member Avatar for harshita
0
298
Member Avatar for ryy705

This should help out. For dynamic data changes look at the list model. [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/list.html"]http://java.sun.com/docs/books/tutorial/uiswing/components/list.html[/URL]

Member Avatar for ryy705
0
195
Member Avatar for kssprabhu

JTextField imageField = new JTextField(4); Image[] images = new Image[42]; //array of images int index = Integer.parseInt(imageField.getText()); Image image = images(index);

Member Avatar for freesoft_2000
0
132
Member Avatar for shapeshifter

[URL="http://www.devx.com/tips/Tip/14311"]http://www.devx.com/tips/Tip/14311[/URL]

Member Avatar for jennifer_netto
0
144
Member Avatar for mrsteve

You need to use generics on your collections with 1.5 to avoid this error. Instead of: ArrayList myList = new ArrayList(); Use: ArrayList<MyObject> myList = new ArrayList<MyObject>();

Member Avatar for mrsteve
0
225
Member Avatar for Clown

[code] public boolean repeat() { //ask user for answer YES, NO //if response is yes, return true //if not yes, then return false } [/code]

Member Avatar for Phaelax
0
81
Member Avatar for shapeshifter

That's more than I would've given to someone who won't even take the time to use proper grammer. Try your homework yourself, and then if you have trouble we might help you.

Member Avatar for Phaelax
0
82
Member Avatar for improgrammer

[URL="http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html"]http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html[/URL]

Member Avatar for Phaelax
0
85
Member Avatar for freesoft_2000

I would go ahead and use the FileInputStream, I just think it'll be easier.

Member Avatar for jwenting
0
93
Member Avatar for Covinus

With just a blank panel, there's really nothing to see. [code] import javax.swing.*; class TestClass extends JFrame { public TestClass() { //change layout of frame this.setLayout(new BorderLayout()); this.getContentPane().add(new JPanel(), BorderLayout.CENTER); } public static void main(String[] args) { TestClass test = new TestClass(); test.show(); } }[/code]

Member Avatar for hooknc
0
99
Member Avatar for giles

I too, would say java. I've learned c++ off and on for years before doing java. With the documentation given with java, learning on your own once you've gotten started is so much easier than c++. And getting started is free! Not to mention Java's automatic garbage collector.

Member Avatar for Covinus
0
362
Member Avatar for abc2004

A JList with a default model could be used as a mutable list. MutableList myList = new MutableList(); myList.getContents().removeAllElements(); myList.getContents().addElement(something); [code] import javax.swing.JList; import javax.swing.DefaultListModel; public class MutableList extends JList { public MutableList() { super(new DefaultListModel()); } public DefaultListModel getContents() { return (DefaultListModel)getModel(); } } [/code]

Member Avatar for Phaelax
0
676
Member Avatar for j1979c

Why not just put the set method in class 2? class 1 wont be able to see the variable anyway.

Member Avatar for jwenting
0
240
Member Avatar for freesoft_2000

hey arvind, how bout you make your own thread instead of asking questions in someone else's topic. I think you should create your own table model. You could extend the DefaultTableModel to give you something to start with, or do your own from scratch with the interface. The main method …

Member Avatar for freesoft_2000
0
1K
Member Avatar for parvin1987

Take a look here to help get started. [URL="http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html"]http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html[/URL]

Member Avatar for Phaelax
0
108
Member Avatar for zidane28

compareTo() takes an object and compares it to the object that called it. For strings, it simply compares the characters. For other objects, it depends on the object. How the method is implemented determines what is necessary for another object to be considered equal to it. It returns 0 if …

Member Avatar for Phaelax
0
88
Member Avatar for vinahorse78

Who would give you a project in java about multithreading when you've never done java before?

Member Avatar for larytet
0
222
Member Avatar for kathryninvt

I dont have a clue what you're asking here. First you mention something about games from a website, then go on to talk about replacing a dlink router with a westell 327. (which I used to troubleshoot all of verizon's routers and modems) Then you go back to the games …

Member Avatar for Phaelax
0
169
Member Avatar for Bonjava

Do what part? What method is wrong? What's it suppose to do and what is it doing instead? Do just say "here's my code, fix it".

Member Avatar for yvs
0
186
Member Avatar for TinchoXVI

stuck on what? I certainly dont want to sit here and analyze your code to figure out what you haven't done on your HW yet. How about you tell us specifically where you're stuck at.

Member Avatar for Phaelax
0
310
Member Avatar for sam1

download the mysql driver, code should all be the same for connecting with mysql on any platform in java.

Member Avatar for Phaelax
0
611
Member Avatar for Phaelax

I'm doing an english paper, an internal proposal memo. I chose a fake company and their problem is use of remote monitoring software which bogs down a system beyond use when its active due to the software doing complete screen dumps for the monitoring. My proposed solution is to rewrite …

Member Avatar for Salem
0
145
Member Avatar for Phaelax

This is a question from a mid-term I had awhile ago. I just want to hear what you guys think the answer is, because I just can't agree with the teacher on this. A(n) ____ is a listener interface that listens for any events that occur during the execution of …

Member Avatar for jwenting
0
189
Member Avatar for moonny

Trace the problem. Find out which object is null then find out where or why its not being initialized

Member Avatar for moonny
0
103
Member Avatar for Phaelax

Title says it all. I've tried getting different system properties with no luck. Not sure if "java.compiler" is the right one or not, but it always returns null for me. The others I've tried are: "java.home" "java.library.path" "java.class.path" java.home gives me: c:\java\j2sdk1.4.2_05\jre But javac is in c:\java\j2sdk1.4.2_05\bin I don't want …

Member Avatar for jwenting
0
282
Member Avatar for Phaelax

I'm writing an IDE for java and already got the compiler linked into it, but I can't figure out how to read the data on the System.err or System.out streams.

Member Avatar for freesoft_2000
0
122
Member Avatar for Manojsah
Member Avatar for server_crash
0
139
Member Avatar for sam1
Member Avatar for Phaelax
0
169
Member Avatar for Dani

Could someone explain to me this "tex" code? Is that what creates the graphic for an equation?

Member Avatar for provenshop
0
174
Member Avatar for Phaelax

I'm trying to find all quoted strings in a given text so that I can apply proper highlighting. I've tried various regex but can't seem to get the results I want. [code] String line = "a big \"yellow\" dog! And a \"purple\" bird!"; String[] tokens = line.split("\".+\""); [/code] That cuts …

Member Avatar for Phaelax
0
97
Member Avatar for sam1

Think of what would happen if you had the following: [code] while(true) { //do something } [/code] That'd loop forever and the program would never get to the rest of your code. If that while loop was run in a Thread, it'd continue to loop forever, but your other code …

Member Avatar for Phaelax
0
134
Member Avatar for xlhmx

I don't see any comma inside quotes. But if so, you'll have to use regex. If not, then: String[] tokens = String.split(",")

Member Avatar for Phaelax
0
122
Member Avatar for Dark_Omen

The End.