2,443 Posted Topics

Member Avatar for notuserfriendly

Why not simply use the vector (or an ArrayList if it does [i]need[/i] to be synchronized at that point) and then call toArray on that Vector/List?

Member Avatar for masijade
0
175
Member Avatar for wowz

This S = (1/2) * perimeter; should be S = (1/2.0) * perimeter; (or something similar), otherwise (1/2) is integer math and produces 0, which makes S 0. (or simply `S = 0.5 * perimeter;` or `S = perimeter/2;`) I would also "predetermine" the value of `(180/Math.PI)` rather than actually …

Member Avatar for masijade
0
162
Member Avatar for cretaros

As long as an element is visible it cannot be disposed. You would have to hide (setVisible(false)) that frame before you can dispose. I don't agree with much of what you're doing here though, to tell you the truth. I find extending frmae to be a bad idea. I would …

Member Avatar for masijade
0
233
Member Avatar for ravicisco2002

It's been a [i]while[/i] since I've done any [i]real[/i] scripting but shouldn't [code]if [ ! -z "$remove_old" || $n_backups -ge $MAX_BACKUPS ]; then[/code] be [code]if [ ! -z "$remove_old" -o $n_backups -ge $MAX_BACKUPS ]; then[/code]

Member Avatar for masijade
0
352
Member Avatar for himmat.m4

Nothing to do with JSP. Either you need to send all possibilites for the "destination" menu and use JavaScript to "filter" those according to the first choice, or you have to learn how to use AJAX (or something similar) [i]properly[/i]. Or, of course, you can let the entire page be …

Member Avatar for himmat.m4
0
71
Member Avatar for plasticfood

Seemingly it would have to be an Integer array, not an int array, although it would probably help to know exactly what "namestimesSet" is, I'm assuming a Set<Integer>.

Member Avatar for plasticfood
0
82
Member Avatar for Yutxz

How have you determined that it is "being ignored"? Put a print statement in there to see. Also, you do know that after the first iteration both x0 and xn have the same value, meaning that in the second iteration 0 is not greater than .0001 and the loop exits, …

Member Avatar for masijade
0
260
Member Avatar for vskumar19
Member Avatar for elcliff
Member Avatar for cowtippa

By creating an appropriate constructor in the "Purse" class. I.E [code]public Bogus(Bogus bogus) { someValue = bogus.someValue; someOtherValue = bogus.someOtherValue; }[/code]

Member Avatar for masijade
0
79
Member Avatar for raghujosh

This [inlinecode]Product product = ProductIO.getProduct(productCode, path);[/inlinecode] probably returned null. Put in some debug output to check the values of productCode, path, and product.

Member Avatar for masijade
0
80
Member Avatar for simransuri

Create a List of Integers (which are the indexes to your questions) and use the random class to produce an int from zero to list.size() then get the Integer at that index from the list (and delete it) and then index into your question array using this Integer. Once the …

Member Avatar for masijade
0
173
Member Avatar for bonafos

[code]// the code a * b * c;[/code] That is as much cut-n-paste code as you are going to get. Post what you have, all error/compiler messages it produces, and/or the difference between the actual and expected output, and we will help [i]you[/i] correct [i]your[/i] code, but we are [i]not[/i] …

Member Avatar for javaAddict
-1
74
Member Avatar for selfuser
Re: Java

Sure, we're happy to help, let's see what you have. IOW we will [i]not[/i] do it for you.

Member Avatar for masijade
-1
58
Member Avatar for aravind rao

No they don't. Those files won't actually be created until you open a FileWriter, FileOutputStream, etc, with them. "new File(String)" does [i]not[/i] physically create a file on the file system.

Member Avatar for javaAddict
0
93
Member Avatar for pankajagar2002
Member Avatar for Katana24

Call doLayout() on the contentPane of the Frame, and then repaint() (just to be sure).

Member Avatar for masijade
0
65
Member Avatar for Mega brains

If you mean that the DB [i]data[/i] is to be stored on the CD, not AFAIK. If you mean only the software for the DB check out JavaDB (embedded usage).

Member Avatar for Ezzaral
0
77
Member Avatar for shhfrlsk06

Because you have created a small C program using Java. Do not simply put everything in the main method. You need to essentially throw this away and start again. Create a class that holds the varying pieces of information as instance variables and that defines methods to do those operations …

Member Avatar for shhfrlsk06
0
135
Member Avatar for hell_tej

Well, that's what you're telling to do (stay the original size, that is). Try looking at the API docs for BufferedImage (and Graphics2D) and see if there is something there that can help you.

Member Avatar for javaAddict
0
5K
Member Avatar for Ghost

Closing this zombie. There [i]is[/i] a "show off your project" forum here.

Member Avatar for masijade
0
614
Member Avatar for pinkygirl

[i]What[/i] exception. Add a printStacktrace to that catch block and post that result. I have a feeling, though, that's its a "classnotfound". Include the jarfile for that api on the classpath.

Member Avatar for masijade
0
279
Member Avatar for hmdb

Separate your GUI code from your DB code. "paintComponent" should [i]never[/i] have anything directly to do with a DB (nor should any other part of a GUI component class).

Member Avatar for masijade
0
126
Member Avatar for suta123

A "final" variable can only be defined [i]once[/i], and when it is static it needs to be defined at the first reference to the Class. Which means that you won't be able to use a method to set the value of a static final variable. You could use a static …

Member Avatar for masijade
0
139
Member Avatar for skank111
Member Avatar for tyson.crouch

[quote]Can not issue data manipulation statements with executeQuery()[/quote] Uhm, what do think this might mean? Look at the API docs for statement/preparedstatement and see if there is another method that is more applicable.

Member Avatar for masijade
0
608
Member Avatar for pmark019

Oh God, Why?, [i]Why? [b]Why?[/b][/i] [code]panel3.setLayout(null);[/code] IMHO this is the [b]worst[/b] thing that you can do. [i]Especially[/i] when you are only using standard labels and text fields. In some rare corner cases it [i]may[/i] be advantageous, but for [i]this[/i]? No!

Member Avatar for NormR1
0
170
Member Avatar for toshiro101
Member Avatar for handrews3583

Well, even your comments declare that you are "ending" a class, then you continue to declare variables and methods? To which class are those to belong?

Member Avatar for JamesCherrill
0
269
Member Avatar for JonGR
Member Avatar for Xufyan
0
193
Member Avatar for kimiko

We are not a (home)work service. Try it yourself, and post your attempt along with detailed information if it "doesn't work".

Member Avatar for masijade
0
211
Member Avatar for pennylynne

After setting the font try calling validate() and or repaint() on the panel containing the items on which the font changes. If that still doesn't do it, then, on the component on which the font changes call component.setText(component.getText()) after setting the font and then [i]still[/i] call validate()/repaint().

Member Avatar for pennylynne
0
115
Member Avatar for dv123

It [i]might[/i] help to know what the error is. Also, many times, you have to actually close the connection to access before changes are committed. Acess is really [i]not[/i] suited to any kind of web application. Also, you really need to remove these scriptlets from your JSP. Scriptlets are [i]extremely[/i] …

Member Avatar for masijade
0
191
Member Avatar for amitbhanot

Java doesn't have any Swings. You find those in playgrounds with kids using them. Now, if you mean the Java Swing (note no s on the end) API, then say that. You [i]might[/i] want to post the relevant parts of your code. And, I [i]hope[/i], you are using a JDialog …

Member Avatar for amitbhanot
0
136
Member Avatar for madawa123

Well, lets see. A latitude/longitude coordinate is in degrees, minutes, seconds (with decimal). 60 seconds to a minute, 60 minutes to a degree. So, first, convert your two longitudes to "absolute" numbers (i.e. (degrees * 3600) + (minutes * 60) + secs) and get the difference between the two (i.e. …

Member Avatar for peter_budo
0
4K
Member Avatar for nickoooname
Member Avatar for JamesCherrill
0
143
Member Avatar for noydoy

Well, lets look at this. Your while condition is [code]while (choice2 == 1)[/code] So, in order for your while loop to "continue", choice2 needs to have [i]what[/i] value? Now, where are you "showing" your error messages? In an if statement block, right? So, what do you think you might [i]add[/i] …

Member Avatar for noydoy
0
2K
Member Avatar for Dean_Grobler

[QUOTE=JamesCherrill;1346898]Just let it put the version variable in and don't worry.[/QUOTE] Just remember, however, that if the interface of the class changes (i.e. new public/protected methods, etc) to change that number or you will have problems if the class is actually serialised as part of the app.

Member Avatar for Dean_Grobler
0
200
Member Avatar for peter_budo

Umm, peter, I thought you knew this one. ;-) [code] str = servletData.toString(); [/code] I believe should be [code] str = new String(servletData); [/code] or [code] str = new String(servletData, charset); [/code] if the "bytes" are neither ascii, nor UTF, nor the local charset. The second one (with the toByteArray()) …

Member Avatar for peter_budo
0
245
Member Avatar for raym.mart
Member Avatar for tyson.crouch

All I can say is, in the distribution instructions/readme tell the user that a mysql needs to be present. A better idea, if the DB is not suppossed to get [i]all[/i] that large, would be to distribute derby.jar with your application and simply create the DB on the fly.

Member Avatar for Ezzaral
0
118
Member Avatar for alexdlaird

You could show some of your code. And try some debug-like print statements to see what happens, and what doesn't. And, I assume, you do not have any empty catch blocks?

Member Avatar for Ezzaral
0
250
Member Avatar for manjukdvg
Member Avatar for punit.it
0
141
Member Avatar for zhouli
Member Avatar for masijade
-2
23
Member Avatar for mani_1991
Member Avatar for Sunshineserene
Member Avatar for LianaN

Firewal, firewall, firewall. You might have opened the "phpadmin" port (whatever port that is), but you seemingly have not opened the standard DB port, and your firewall simply drops packets. Also, don't forget to properly configure your grants.

Member Avatar for LianaN
0
4K
Member Avatar for Kasanda
Member Avatar for Jawahar prabhu
0
147
Member Avatar for SeanC

It would help to know [i]what[/i] you are actually trying to [i]acheive[/i] here, as this is [i]probably[/i] not the right way to do it.

Member Avatar for masijade
0
469
Member Avatar for kekekerush
Member Avatar for stultuske
0
83

The End.