1,678 Posted Topics

Member Avatar for firebugg
Member Avatar for firebugg
0
518
Member Avatar for Bladtman242

[url]http://www.pcmech.com/article/monitor-your-computers-bandwidth-usage/[/url] Just the first thing I found. Something like that is what you're talking about, right? Since there are pre-existing programs that do what you want, anyone of any experience level can accomplish this task.

Member Avatar for Bladtman242
0
152
Member Avatar for A M R

You can only make updates to SWT controls from within the SWT UI thread. You need to use either synExec or asyncExec to accomplish running other code that updates SWT controls because these methods cause the code to be run on the SWT UI thread. See : [url]http://book.javanb.com/swt-the-standard-widget-toolkit/ch05lev1sec7.html[/url] P.S. you …

Member Avatar for A M R
0
124
Member Avatar for Traicey
Member Avatar for BestJewSinceJC
0
181
Member Avatar for santiaguinho15

[QUOTE=kvass;1142341] [B]O(n) [/B]means that the algorithm is [B]linear[/B]. . [B]O(n^2) [/B]means that the algorithm is [B]quadratic[/B] . . O(n^3) [/B]means that the algorithm is [B]cubic[/B]. . [/QUOTE] To follow up on that, the essential characteristic to remember is that if an algorithm is "linear", that means that if an algorithm …

Member Avatar for BestJewSinceJC
0
106
Member Avatar for PuQimX

Your English was confusing to me, but if it helps, you can output an Object [URL="http://java.sun.com/developer/technicalArticles/Programming/serialization/"]using Serializable[/URL]

Member Avatar for BestJewSinceJC
0
70
Member Avatar for LevelSix

What is wrong with you? This thread is over two years old. And you added nothing to it.

Member Avatar for BestJewSinceJC
0
962
Member Avatar for Narue
Re: IRC

I prefer the forums where I can leisurely browse to "live" chats, so that's why you'd rarely catch me there regardless of whether lots of people used it or not. But Narue is right, the majority of members probably have no idea that it exists.

Member Avatar for Nick Evan
0
281
Member Avatar for Cort3z

1.541900433861831E-6 is an extremely small value. Perhaps you are experiencing a precision problem due to how small it is, it can only register as 0 in a double? A second possibility is that println() is not printing your value to enough decimal places in order for you to see anything …

Member Avatar for Cort3z
0
96
Member Avatar for polska03

You posted a lot of code. If you post any amount of code, you should use code tags. Reading the forums rules would have told you this (as would general observation, i.e. looking at the reply box)

Member Avatar for javaAddict
0
143
Member Avatar for BestJewSinceJC

Are different in different places. I'm not sure if this is considered a problem or if Dani is aware, so just letting you know.

Member Avatar for BestJewSinceJC
0
44
Member Avatar for pankajagar2002

As long as the list, a swing component, is getting updated by the EDT (the swing thread), not your other thread, everything should work fine. I'm not an expert but that has been my experience. Is that the case? You can test by calling [URL="http://java.sun.com/javase/7/docs/api/javax/swing/SwingUtilities.html#isEventDispatchThread%28%29"]this method[/URL] in the method where …

Member Avatar for BestJewSinceJC
0
302
Member Avatar for shorty246

It says to pass the capacity to the constructor. The capacity of an array is simple how many slots/indexes it should have. This is an int, not a double, and the array should be created to be the size passed in. Look up how to create an array in Java. …

Member Avatar for BestJewSinceJC
0
141
Member Avatar for laelzio.mosca

If it is made by Acer then I'd never buy it. Buy a different brand with a better reputation. Acer laptops are made cheaply. They will not survive any wear and tear.

Member Avatar for BestJewSinceJC
0
85
Member Avatar for TheWhite

I heard people at my [previous] internship talking about this, it is called an SQL injection. So look up how to prevent mySQL injections on google. I found how to prevent them in php fairly quickly. But I'm assuming your problem was a lack of the right search terms, so …

Member Avatar for BestJewSinceJC
0
146
Member Avatar for christiangirl

You put the absolute path of the file, but did it find the file? You enclosed your directory names in single quotes, which doesn't make sense to me. I doubt it is finding the file. Read [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html"]this[/URL] which describes what will happen if the image isn't found: nothing will happen, …

Member Avatar for BestJewSinceJC
-1
246
Member Avatar for Allyw

Umm... why? I'm running Ubuntu in a VM for my OpSys class and it is only currently using 7.1 gigs of hard drive space. It is set to max allow 8GB of space. It also only needs 256MB RAM (but I just set it to twice that).

Member Avatar for BestJewSinceJC
0
404
Member Avatar for Zoxx98

The first bad habit I noticed is that you initialized your stID array as an array of 100 ints, but then you have this piece of code: [CODE] for(int i = 1; i<=numStu;i++){ System.out.println("Enter Student ID: "); sID[i] = scan.nextInt(); outputFile.println(sID[i]); }//end of for[/CODE] If the user enters a number …

Member Avatar for BestJewSinceJC
0
185
Member Avatar for intes77

You don't need a boolean array. You need a String. Then you need to iterate over the String, determining if each piece of the String is a character or not. Check out the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html"]isLetter method[/URL] of the Character class. You can determine if a specific piece (i.e. index) of a …

Member Avatar for BestJewSinceJC
0
179
Member Avatar for nanosani
Member Avatar for supersoup

You can simply use hasNextInt() to determine if there is one in the input. If there isn't then I believe it will continue gracefully.

Member Avatar for BestJewSinceJC
0
117
Member Avatar for motress

Both the String class's split method and regular expressions would be good solutions for this problem. Using the split method and splitting on "[|]" would probably be easier though. The reason you would have to split on [|] and not on | is as follows: (quoted from s.o.s's post in …

Member Avatar for BestJewSinceJC
0
200
Member Avatar for smokin745

[url]http://java.sun.com/docs/books/tutorial/essential/exceptions/[/url] Does this do the trick? Use a try catch block.

Member Avatar for Cort3z
0
174
Member Avatar for Destiny1

Well. . you said you've taken Java before. Do you know what an array is? And what a parameter is? [QUOTE]Write a method that takes a full array of double as a parameter[/QUOTE] [CODE] public static double arrayMean (double getMean)[/CODE] Your arrayMean method takes a double as a parameter. It …

Member Avatar for mkurdukar
0
506
Member Avatar for Olliepop

Before you leap into GridBagLayout I would strongly advise you to read a little about each of the various Layout Managers. . (GridBagLayout, BoxLayout, GridLayout, etc). I'm pretty sure each of them contains a section explain what they are useful for doing and why. You should choose your layout manager …

Member Avatar for Olliepop
0
141
Member Avatar for Alpdog14

[CODE] int number = 2567; String num = Integer.toString(number); String str = num.substring(//put correct argument here); [/CODE] I'm intentionally omitting the argument to substring so that I'm not just giving you all of the code. Oh, and keep in mind that in order to properly get the substring, you should …

Member Avatar for BestJewSinceJC
0
201
Member Avatar for Merosansar

Right before you call the if statement, why don't you try printing out the value of each of those equals() method calls and tell us what it says. [CODE]System.out.println(mail.equals(usermail)); System.out.println(date1.equals(date)); System.out.println(title1.equals(title));[/CODE]

Member Avatar for ad_rulz
0
135
Member Avatar for amit.hak50

It is called a Binary Heap when you are storing it as an array. [url]http://en.wikipedia.org/wiki/Binary_heap[/url] (that may not be the best resource, it is a little hard to understand - but start googling "binary heap" and you'll find numerous useful articles).

Member Avatar for BestJewSinceJC
0
120
Member Avatar for skwatamkar

For playing sound, you can use the Java Sound API. Specifically, it sounds like the section in this article on [URL="http://java.sun.com/docs/books/tutorial/sound/playing.html"]Using a Clip[/URL] is relevant to what you are trying to do.

Member Avatar for skwatamkar
0
140
Member Avatar for collinsislee

So "what they did in class" was to assign a lot of blank methods that [I]you[/I] are supposed to implement. You would've heard the teacher's spiel about doing your own work, too, except you weren't there for that either. My point here is this: do your own work. We're here …

Member Avatar for BestJewSinceJC
0
255
Member Avatar for jpavao

So you can see inColecaoPanel but you can't see the panel inside of it? Did you try calling inColecaoPanel.revalidate() after you called setVisible on it? Oh, and if you attach your project as a zip file, I'll run it on my machine and try to figure out what is going …

Member Avatar for jpavao
0
170
Member Avatar for LitlAjah

[QUOTE=Narue;1131804] This is a very simple algorithm that requires little more than common sense. Just pretend someone is handing you money and that you get to keep the smallest and largest bills. When you're done outlining the steps, turn the process into a flow chart. It may sound harsh, but …

Member Avatar for mrnutty
0
102
Member Avatar for smokin745

[URL="http://www.geekpedia.com/tutorial272_Bubble-Sort-Algorithm-in-Java.html"]This link[/URL] has an implementation of bubble sort in Java. If you look at the bubble sort code, all you need to do to adapt it to your needs is modify it so that it compares your book numbers and so that it swaps your book objects. Two simple modifications. …

Member Avatar for BestJewSinceJC
0
164
Member Avatar for tabs

I see you have HashMaps stored in your ArrayList. What is it that you want to average exactly? Do you want to add up the values of each HashMap? Because you have Objects stored as the values in your HashMap. I think you need to give us more information on …

Member Avatar for BestJewSinceJC
0
93
Member Avatar for tinamenon
Member Avatar for TheWhite
Member Avatar for houlahan

[CODE] for (int i = 0; i < 200; i++) { patient = (Patient) in.readObject(); }[/CODE] Why do you need a for loop there? And why a hard-coded for loop at that? And why do you need to test to see if the patient's name is Luke anyway? If you're …

Member Avatar for houlahan
0
97
Member Avatar for bkafroboy69

Your add method is wrong. It says to add 'value' to the array. You added one to value, and never added it to any array.

Member Avatar for stevelg
0
170
Member Avatar for Shinedevil

Is that a serious question? People take college courses, high school courses, certification programs, ask work related questions, have their own projects, etc

Member Avatar for jwenting
0
139
Member Avatar for xellos

Netbeans is arguably easier but you will learn more by designing GUIs by hand. Sometimes netbeans has a difficult interface to use, but for most issues, it is probably easier. I prefer not to deal with the netbeans issues though, and I do it by hand.

Member Avatar for jwenting
0
137
Member Avatar for schippi

You were supposed to post a normal thread not a code snippet for asking questions about your code. Anyway, the error message shouldn't correspond to that line, it should correspond to a line where you used SphericalCone class (i.e. where you used the new statement). I think you may have …

Member Avatar for BestJewSinceJC
0
175
Member Avatar for rastus77

For your first answer the printValues method is wrong. You printed out the words "integer1, float1", but what they want you to do is print the [I]values[/I] of those variables. [CODE] //This is wrong, it prints the words integer1 and float1, not the values. public void printValues() { System.out.println("integer1, float1"); …

Member Avatar for BestJewSinceJC
0
156
Member Avatar for rastus77

[CODE]public static void main(String[] args)[/CODE] is different than what you have.

Member Avatar for peter_budo
0
223
Member Avatar for evilsithgirl

If you use merge sort to sort anything at all, your algorithm will be at least O(nlgn), so your algorithm will not meet the qualifications. In fact, you cannot use any comparison sorting algorithm, (merge sort being an example of one) because any comparison sort is at least O(nlgn). Look …

Member Avatar for abhimanipal
0
135
Member Avatar for wee_shark

[QUOTE=wee_shark;1137041]Thanks for that its a very cool thing. I did not know about it. I'm afraid I wanted to display the txt with a Jlabel underneath the button. Any ideas on that?[/QUOTE] Yeah. Intercept the event from JButton (I [I]think[/I] you could do this by making your own class that …

Member Avatar for BestJewSinceJC
0
112
Member Avatar for skwatamkar

You're using JTable I assume? See "setting and changing column widths" [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#width"]here[/URL] In particular, you might be interested in the section of text where it says, "For an example of setting cell widths based on an approximation of the space needed to draw the cells' contents, see the initColumnSizes method" …

Member Avatar for BestJewSinceJC
0
113
Member Avatar for plodder

It depends where you defined the tree object. If you defined the tree object within main, then you can only use the tree object within main. The only exception to this rule is if you pass the tree object as a parameter to a method. [url]http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html[/url] You may also want …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for pinansonoyon

If you extend an abstract class you have to either A) implement its method B) declare your class abstract as well [url]http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html[/url]

Member Avatar for BestJewSinceJC
0
198
Member Avatar for NinjaLink

You know Java has a premade Stack class already, right? If your teacher is forcing you to make your own, that makes sense (you'll learn a lot more), but otherwise, you might want to use the existing one. Anyway, where you said [CODE]System.in.read()[/CODE] you should be calling one of BufferedReader's …

Member Avatar for BestJewSinceJC
0
748
Member Avatar for chrishtones

I'm waiting until I graduate either way, but I'll eventually be getting that certification. I'm assuming by the end of the summer it will be transferred to oracle?

Member Avatar for jwenting
0
223

The End.