3,927 Posted Topics

Member Avatar for Q8iEnG
Member Avatar for BestJewSinceJC

If you consider that the component generally starts with a cleared surface of the background color, it's often unnecessary to use clearRect() or fillRect() to clear out the background, but if you are maintaining an image reference for purposes of buffering some updates then you would need to clear that …

Member Avatar for BestJewSinceJC
0
138
Member Avatar for Zibo

You would need to run a loop like that on a separate thread from the Event Dispatch thread because that event thread is where repaints of the screen are processed. There is a small tutorial on that here: [url]http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html[/url]

Member Avatar for Zibo
0
131
Member Avatar for marco01

You didn't say which line the error is occurring on, but I am guessing that it's this one[code]int minMarks = Collections.min(tmaMarks);[/code]because the [URL="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#min(java.util.Collection)"]Collections.min()[/URL] method states that exception is thrown when it's invoked on an empty collection - which you are doing.

Member Avatar for marco01
0
87
Member Avatar for NicAx64
Member Avatar for BestJewSinceJC

In the same vein you are already discussing, keep in mind that you don't have to code all of the coordinate stuff yourself either. You can make a small wrapper to manage that glyph that just contains the other objects you need to work with[code]class TeamGlyph { private Team team; …

Member Avatar for BestJewSinceJC
0
161
Member Avatar for MrDiaz

[code]Form1 form = new Form1(); form.setVisible(true);[/code]Of course, that still leaves it to you to create your "Form1" class that extends JFrame or whatever. [url]http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html[/url]

Member Avatar for MrDiaz
0
77
Member Avatar for kingarabian

I'm guessing it's decompiled code. If you want to know the details of what it is doing, consult the source.

Member Avatar for kingarabian
0
128
Member Avatar for serkan sendur

[QUOTE=serkan sendur;863563]i need more precise info like; go grab this brand this model and this guitar, then you are good to go...[/QUOTE] It's just not that simple. There is a wide variety of amps with a wide variety of different sounds and settings. Add in effect pedals/boards such as those …

Member Avatar for Ezzaral
0
188
Member Avatar for VernonDozier

[QUOTE=mrboolf;759462]...but it demonstrates extraordinary bad taste to name a son just to "have fun" ...[/QUOTE] Well, the parents who do that probably only have that son from "having fun" and thinking things through is not their strong suit.

Member Avatar for sneekula
2
485
Member Avatar for redcoder07

Here's a tutorial that should get you there: [url]http://www.goodphptutorials.com/track/62[/url]

Member Avatar for Ezzaral
0
1K
Member Avatar for Zibo

Use [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource"]getClass().getResource() to load them[/URL].

Member Avatar for BestJewSinceJC
0
178
Member Avatar for AMetnik

As you have it described, simply [icode]java Main[/icode] should work just fine. You do not need to include the ".class" part. In fact, when the "java" command sees the ".", it assumes that is a package designation, which is why it is trying to find "Main/class".

Member Avatar for peter_budo
0
602
Member Avatar for disspointed

[QUOTE=jephthah;858999] i think i need to adjust my meds. or cut back on caffeine. or have more sex. or something.[/QUOTE] At least work backward through that list - you may as well start with the best option :icon_cheesygrin:

Member Avatar for ambalika
0
305
Member Avatar for Kamal_Java

I think [URL="http://java.sun.com/javase/6/docs/api/java/util/TreeMap.html"]TreeMap[/URL] is the closest to what you are looking for. As for "storing unique item", the map is unique in the key, but not the value. You can read more info on the various collection implementations here if you like: [url]http://java.sun.com/docs/books/tutorial/collections/implementations/index.html[/url]

Member Avatar for Ezzaral
0
136
Member Avatar for rahul8590

Java Advanced Imaging (JAI) API has a lot of tools for that: [url]http://java.sun.com/javase/technologies/desktop/media/jai/[/url] or you can look through the standard image api package: [url]http://java.sun.com/javase/6/docs/api/java/awt/image/package-summary.html[/url] You may also find this tutorial helpful: [url]http://www.dickbaldwin.com/java/Java174.htm[/url]

Member Avatar for kvprajapati
0
115
Member Avatar for Nisaac

Yes, dumping your homework into 4 posts with no code tags and no specific questions is not likely to yield a lot of constructive advice.

Member Avatar for Nisaac
0
206
Member Avatar for deepakyadav1830
Member Avatar for javaAddict
0
247
Member Avatar for grisha83

Well, perhaps this chapter from Thinking In Java, 3rd ed will be helpful: [url]http://www.codeguru.com/java/tij/tij0087.shtml[/url] You might look through the info on Java Glossary as well: [url]http://mindprod.com/jgloss/array.html[/url]

Member Avatar for John A
0
114
Member Avatar for sumithar
Member Avatar for serkan sendur

[QUOTE=serkansendur;753790]yeah i am currently working with raima database and there is no forum i can ask about it.[/QUOTE] This certainly looks like a forum to me: [url]http://www.raima.com/forum/[/url] I doubt that Dani wants to create a separate forum for every single database that is available for use.

Member Avatar for bhouglum
0
144
Member Avatar for DotA

Most likely the graphics context in the earlier version that you obtained from the getGraphics() call and drew on got updated by a repaint operation - so no more image. Overriding paintComponent() as you did in the second example is the proper way to do it.

Member Avatar for VernonDozier
0
135
Member Avatar for jpjpjpjpjp

You might take a look at the tutorial on using object streams: [url]http://java.sun.com/docs/books/tutorial/essential/io/objectstreams.html[/url]

Member Avatar for kvprajapati
0
74
Member Avatar for valenchang

Perhaps this article will give you some ideas: [url]http://www.developer.com/java/article.php/893471[/url]

Member Avatar for Ezzaral
0
115
Member Avatar for KahneFan

$20 flat to whoever referred the most and it's probably over by now since the post is several months old.

Member Avatar for dailyearner
0
188
Member Avatar for wedunnit

[QUOTE=wedunnit;855059]I do not understand the way in which an array of type string can be associated with int values and double values in order for calculations, and therefore displays, to be credited correctly. Any help or insight would be greatly appreciated.[/QUOTE] I'm not certain that I understand your question exactly, …

Member Avatar for BestJewSinceJC
0
103
Member Avatar for shivarajM

Yes, take a look at [URL="http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html"]ProcessBuilder[/URL].

Member Avatar for Ezzaral
0
35
Member Avatar for supersonik

DaniWeb is an IT-related discussion site, not a site for "rants/debates/etc". The Geeks Lounge, which is just one of the forums of many, would be the only appropriate place for such postings. Perhaps a perusal of the [URL="http://www.daniweb.com/forums/faq.php"]FAQ[/URL] would be useful. You'll find little in the way of sticky threads …

Member Avatar for shivarajM
0
140
Member Avatar for ks7_666

And what is your question? That's just a homework assignment you posted.

Member Avatar for jephthah
0
315
Member Avatar for get2tk
Member Avatar for Whilliam

You can clean it up a bit manually and save it as a bmp or png, but you can't just "unsave" the unwanted pixelation because it is now part of the image.

Member Avatar for jbennet
0
225
Member Avatar for Ramy Mahrous

You can view all of your reputation from the User Control Panel. Click the link for Latest Repuation Received.

Member Avatar for jbennet
0
80
Member Avatar for bas_brain

Try this instead[code=php]function checkValues($postValues) { $valid = true; foreach($postValues as $key => $value) { if(!isset($key) || $value == "") { $valid = false; } } return $valid; }[/code]Edit: Noticed that the && should be ||

Member Avatar for bas_brain
0
193
Member Avatar for jephthah

And if you don't like having to type so much to yell at the noobs, the [URL="https://addons.mozilla.org/en-US/firefox/addon/1347"]Clippings add-on[/URL] for Firefox can it effortless :)

Member Avatar for Ezzaral
0
293
Member Avatar for KingsKidy

I would recommend making a class to represent those items that appear in the list. The toString() method of that class should return the description you wish to see in the list. On selection, you can access that object through getSelectedValue() and read the image path from that object. HashMap …

Member Avatar for Ezzaral
0
116
Member Avatar for c_skyscraper
Member Avatar for Ezzaral
0
99
Member Avatar for GrimJack
Member Avatar for Ancient Dragon
Member Avatar for sammo5889

You need to actually add 'dx' and 'dy' to the existing values of x and y. You have set them equal instead of adding. Also, your constructor needs to set the values of your property variables equal to the parameter values that were passed. Your current constructor does not do …

Member Avatar for zyaday
0
116
Member Avatar for swatiringe

So post your current code and explain exactly what you are having trouble with, as you were told above. This is not a "code by request" forum.

Member Avatar for Freddy00daniweb
0
170
Member Avatar for lionheart1982

Though it has nothing to do with your local job market: [URL="http://langpop.com/"]Programming Language Popularity[/URL]

Member Avatar for jephthah
0
196
Member Avatar for misgee2001

Looks like you already have instructions right there. So start coding and post it up when you have problems or specific questions. "Send me a code to do my homework" is not a specific question.

Member Avatar for Ezzaral
0
69
Member Avatar for Grn Xtrm

You're trying to access element 43 of a vector that only contains 2 elements. Also, this code[icode]opVect.removeElementAt(opVect.lastElement());[/icode] is using an object parameter, lastElement(), instead of an int index parameter for removeElementAt(). You are doing that in several places and really the only reason it even compiles is a nuance of …

Member Avatar for Grn Xtrm
0
142
Member Avatar for sneekula

Well, Beck has really gone off the deep end lately so I wouldn't pay much attention anything he was screaming at this point.

Member Avatar for GrimJack
0
478
Member Avatar for MDGM
Member Avatar for peter_budo
0
286
Member Avatar for BestJewSinceJC

Here's the simplest example I can piece together of a listener (which is an observer). You've used it quite a bit in Swing and I'm sure you will recognize the elements immediately[code=java] import java.util.ArrayList; import java.util.List; public class mainTest { public static void main(String[] args) { Model model = new …

Member Avatar for Ezzaral
0
1K
Member Avatar for xgmx

We're just a blip in the timescale so far. The dinosaurs were dominant for ~160 million years. The [I]Homo[/I] genus only has about 2.5 million under its belt so far and I don't think that I would bet on even seeing 3 million.

Member Avatar for sneekula
0
162
Member Avatar for jollyton12

This [code]java.lang.ArrayIndexOutOfBoundsException: 1[/code]means your code tried to access element index 1 of an array that has less than 2 elements. This line [code]HighScoreManager.readHighScores(HighScoreManager.java:22)[/code]shows that it occurred on line 22 of HighScoreManager in the readHighScores method. So check your array access there.

Member Avatar for jollyton12
0
454
Member Avatar for skiing

Well, your class doesn't actually implement Comparable and your syntax in the declaration of the comp() method is a bit off. Perhaps looking over this article on generic types which shows a Comparable implementation would help: [url]http://www.onjava.com/pub/a/onjava/excerpt/javaian5_chap04/index1.html[/url]

Member Avatar for Antenka
0
106
Member Avatar for kssi89

This loop is only executing the single line after it for one thing[code]for ($j = 0; $j < mysql_num_rows($result); $j++) $i=0;[/code]There are no braces for the larger block.

Member Avatar for komang80
0
154

The End.