2,443 Posted Topics

Member Avatar for fankoff

Well, what would happen if the connection (or something else) failed before the code ever got to the point where the ResultSets could be created? The would be "uninitialised", right? Since they have never had a value assigned to them, right? So, on the lines where you declare them, why …

Member Avatar for bapi
0
106
Member Avatar for Unbidden Ghost

Java is not even [i]close[/i] to "a slow death", as you call it. The largest problem with .Net is that it runs only on Windows and [i]most[/i] server architectures (which is where most commercial activity takes place) are [i]not[/i] Windows. I know, I know, .Net, in theory, can run anywhere, …

Member Avatar for Stefano Mtangoo
0
346
Member Avatar for spinachio
Member Avatar for noon580

Let us see your code and we will help you correct (when you tell us exactly what errors you are getting), but this is not a homework service. We will not do it for you. That is, in fact, against the terms of use that you agreed to you when …

Member Avatar for masijade
0
118
Member Avatar for ubi_ct83

remove those brackets from the end of the variable name, both when calling the method [i]and[/i] in the declaration. In the declaration, place them after int, not after value (they both work but this way is clearer). Edit: And I [i]hope[/i] that that "generate" signature is not a serious attempt.

Member Avatar for ubi_ct83
0
105
Member Avatar for Alex_
Member Avatar for pinsickle

You would be better off using a "DB" approach. Even if it is a "homegrown" type thing using RandomAccessFile, but better would be something like JavaDB/Derby.

Member Avatar for JamesCherrill
0
128
Member Avatar for ubi_ct83

Post your algorithm and we will, probably, give you hints and nudges to help you increating a method that implements it.

Member Avatar for masijade
0
107
Member Avatar for mikki2

An instance variable of Class Array (which is the class behind [i]all[/i] arrays). It is an int. Edit: And, as noted, it represents the length of the array, and since arrays are 0-indexed, the last index of the array is length - 1, of course.

Member Avatar for masijade
0
10K
Member Avatar for KcNaveen

As in? What exactly do you want to know? toString is a method of Object. Object is implicitly extended (somewhere in the hierarchy chain) by [i]every[/i] Class. So, every Class has a toString method. Usually it prints some standard String derived from Objects toString method (see the API docs to …

Member Avatar for leiger
0
91
Member Avatar for anjkris07
Member Avatar for anjkris07
0
210
Member Avatar for vijayindia

That deprecated warning also tells you what you should done (i.e. recompile with the -Xlint:deprecated option). Have you done that?

Member Avatar for CrazyDieter
0
109
Member Avatar for Umar Ali

Yeah, well, I see where you create a JFRame, a JPanel, and a JTable, but no where do I see where you add the JTable to the JPanel, or the JPanel to the JFrame, or the JTable, to the JFrame, etc, etc, etc, so, yeah, you see a blank JFrame. …

Member Avatar for NormR1
0
104
Member Avatar for aarya

executeUpdate returns an int indicating the number of rows affected by the query. It does not return a ResultSet.

Member Avatar for gauravleoheart
0
448
Member Avatar for bhavna13

Make an [i]attempt[/i], at least. If it "doesn't work" then post that code and describe, [i]exactly[/i], what "doesn't work" mean and provide all (and complete) compiler/error messages. This is [i]not[/i] a code service.

Member Avatar for masijade
0
175
Member Avatar for Roshan_Jain
Member Avatar for Wakesta

Yes, study what the code is suppossed to do and then program it in Java. Simply "converting" it would only create a hack that would be [i]far[/i] from effecient.

Member Avatar for pjade
0
102
Member Avatar for Tyrone.Wilson
Member Avatar for NormR1
0
145
Member Avatar for ravi25a

8080 almost definately not, and you should, of course, be using "jdbc:[b]oracle[/b]:thin", not "jdbc:odbc:thin", of course.

Member Avatar for parry_kulk
0
197
Member Avatar for abctoz

And for general information read [url=http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]this article[/url] thoroughly. You are falling into the "not a command" trap. But Peter is correct, you should [i]not[/i] be using Runtime for this, [i]at all[/i].

Member Avatar for masijade
0
178
Member Avatar for P00dle

If they are both on the same machine, or have access to a reliable shared disk (although the processes that create and maintain that shared disk also use sockets, so I guess that one doesn't count) yes. Is it practical? No. Is it effecient? No. Does it make any kind …

Member Avatar for masijade
0
146
Member Avatar for abctoz

That is an OS specific question. No programming language has anything to do with the file and user rights system of the OS on which it is running.

Member Avatar for masijade
0
335
Member Avatar for vardhmansk

for the "beginning" of the scrollbar [code] scrollPaneVar.getHorizontalScrollBar().getValue(); scrollPaneVar.getVerticaalScrollBar().getValue(); [/code] Add these values to the above values to get the "end" of the scrollbar [code] scrollPaneVar.getHorizontalScrollBar().getModel().getExtent(); scrollPaneVar.getVerticaalScrollBar().getModel().getExtent(); [/code] Divide those summed values by 2 to get the "middle" of the scrollbar. See the API docs for JScrollPane, JScrollBar, and BoundedRangeModel.

Member Avatar for vardhmansk
0
224
Member Avatar for Monkeyseraph
Member Avatar for NormR1
0
93
Member Avatar for gedas

Nothing to do with Java, to tell you the truth. The signal that the Wii uses, and what (and how, i.e. in what form) data is transmitted/received over that signal is what's at issue, and that is [i]completely[/i] language independent. Try to find the signal, then read the bytes from …

Member Avatar for gedas
0
112
Member Avatar for nchouhan

Neither of which are options in Java. Those would be OS specific options and you would have to write a JNI library per OS to be able to do something like that, so, if you are going to pursue this course of action, start asking at an OS specific forum …

Member Avatar for nchouhan
0
161
Member Avatar for maxish

Redirect STDERR and STDOUT to a file and see what shows up there, first. You can't diagnose anything without gathering any information.

Member Avatar for masijade
0
423
Member Avatar for gokul.raja

Add a single JPanel to the JScrollPane. Use FlowLayout with vertical (or horizontal, depending on which way you want to "scroll") alignment in that JPanel, and add the JPanels that are to be added "dynamically" to that JPanel. Then, don't forget to call validate() and/or repaint() on the JScrollPane.

Member Avatar for gokul.raja
0
2K
Member Avatar for arash_khazaei

You should not be calling "paintComponent" directly. You should be calling validate() and/or repaint() on the component.

Member Avatar for masijade
0
109
Member Avatar for NPOT
Member Avatar for masijade
0
132
Member Avatar for P00dle

replace all single slants with double slants before (or while) calling "aregex". [code]str.replace("\\", "\\\\")[/code] note: replace, [i]not[/i] replaceFirst or replaceAll.

Member Avatar for P00dle
0
4K
Member Avatar for soUPERMan
Member Avatar for Abdel_eid

[url]http://java.sun.com/docs/books/tutorial/deployment/jar/index.html[/url] [i][b]again[/b][/i]

Member Avatar for DeadSoul
0
315
Member Avatar for Clawsy

You need a mobile phone attached to your computer, probably, and probably a specific type, or an internet gateway, to which you would probably need a subscription. Check with whoever/wherever you got that "SMS" and "IntelliSMS" class.

Member Avatar for jwenting
0
987
Member Avatar for jiraiya

As long as you're not doing any Runtime.exec type stuff you shouldn't have any problems. You [i]will[/i] want to test it, first, though.

Member Avatar for jwenting
0
91
Member Avatar for mayank.15
Member Avatar for idlackage

The line [code]JLabel label[] = new JLabel[ numLabels ];[/code] creates an array of "numLabels" length containing references of the [i]Type[/i] JLabel, but with [i]value[/i] null. You still have to initiate the individual elements. I.E. [code]label[i] = new JLabel();[/code]

Member Avatar for idlackage
0
113
Member Avatar for sfrider0

Use an HTML parser of some sort. Google for one. Adding it to the JNLP list or the archive tag will make it available to an applet from the server.

Member Avatar for sfrider0
0
96
Member Avatar for ceyesuma

Uhm, is this a webapp? If so, simply save the bean to the session. If it is not a webapp, save the bean elsewhere (Preferences. maybe). Assuming this is simply a "user profile" bean and not actual "data", as that is more view related than data related.

Member Avatar for ceyesuma
0
82
Member Avatar for socal

Well, that, and the missing quote where you set name, and the fact that you are simply resetting local values in that constructor rather than setting the instance values, but I'll assume you know all that by now.

Member Avatar for masijade
0
69
Member Avatar for ChPravin

It might help to see what it is you are doing inside that while loop, but I will explain the most likely cause. That being, performing an execute on a statement automatically closes all resultsets associated with that statement so, if you do something like this [code]Statement s = conn.createStatement(); …

Member Avatar for masijade
0
943
Member Avatar for Pras008

[code] // code related to antivirus [/code] There I wrapped "code related to antivirus" in code tags. Try Google, please. If that doesn't work, try asking specific questions, not "give me teh codez".

Member Avatar for shrex
0
92
Member Avatar for bufospro

Because Strings are immutable. You cannot change it's content, you can only create a new String containing modified content, so [code]str.replace('x', 'k');[/code] should, of course, be [code]str = str.replace('x', 'k');[/code]

Member Avatar for bufospro
0
103
Member Avatar for ceyesuma

This [code] ps.setString(1, newUser);<--------------------[/code] is not your problem. This [code] ResultSet rs = ps.executeQuery(); System.out.println("ResultSet rs= : "+rs.toString()); String password = rs.getString(1);[/code] is your problem. You have not called next() (or first()/last()/etc. for scrollable resultsets) before calling getString() so the current "cursor position" is [i]before[/i] the [i]first[/i] row, i.e. not …

Member Avatar for ceyesuma
1
1K
Member Avatar for Hari4
Member Avatar for masijade
0
104
Member Avatar for OffbeatPatriot

[QUOTE=OffbeatPatriot;1221504]But I've been told that in Java the base hash code of an Object is simply the memory address of the object[/QUOTE] As has been implied already, someone told you wrong.

Member Avatar for jwenting
0
297
Member Avatar for yeezy_10
Member Avatar for masijade
0
206
Member Avatar for Hakoo

Uhm, new Timestamp(dateVar.getTime()), maybe? (Combinded with PreparedStatements setTimestamp, of course.) You are doing this stuff in external Java Classes (earlier Beans, now POJOs), right?

Member Avatar for masijade
0
33
Member Avatar for OffbeatPatriot

I assume all of these "Actor" classes extend the same base class? If so, add a getInstance(WhateverThisCodeThigIs code) abstract method to that class and override it in all of the other classes.

Member Avatar for ~s.o.s~
0
180
Member Avatar for Illidanek

Create a class that extends FilenameFilter (not FileFilter) (and it can even, easily, be an anonymous inner class) and use the setFilenameFilter method of FileDialog. Let's see your attempt at that (BTW a [i]quick[/i] look at the API docs [i]should[/i] have pointed this out, FileDialog only has about 10 methods). …

Member Avatar for masijade
0
1K

The End.