The explaination given in javadocs for deprication of runFinalizersOnExit in System class is that "It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock". But the finalizers are ...
where can i find the related examples?
355 byte By
folkenf at 2007-9-26 1:16:08
Well i would like to create a JButton, and to set an ImageIcon that i would draw by myself.I try Component.createImage(width, height)then i get an Image.I know that i can create an ImageIcon from this image.How can i draw in this Image ?My method that draws is paintIcon(Graphics2D g2)Please ...
858 byte By
rmweerd at 2007-9-26 1:16:09
I have created an applet with needs access to system resources, therefor I had to create and sign a jar file. The jar must installed on the client for performance reasons. Another part of the applet must still loaded from the server, so I used the archive tag. But in spite of the fact that the ...
324 byte By
connys at 2007-9-26 1:16:10
Hi I have got a JList that can be dynamically updated. However after one or two clicks the JList stops responding because the listSelectionListener is not called. I am using an instance of DefaultListModel. Could someone please suggest any possible solutions or possible reasons. Help much ...
636 byte By
mort101 at 2007-9-26 1:16:14
Hi all..I have a column in a JTable that consists of checkboxes. These checkboxesare created via my getColumnClass method in my table model - I guess adefault cell renderer(?). I also specify what cells are editable and noteditable in my model. This works fine - if a cell is not editable, I ...
143 byte By
carrolf2 at 2007-9-26 1:16:15
How can I get my JApplet to be able to write to a file. I keep getting access rights issues. Do I use getCodeBase()?thanks
465 byte By
M_Timur at 2007-9-26 1:16:16
I have such a problem : in method fileReader I read file. And data in this file have different types. And I want mot to make a lot of getData methods for each type, but to make one getData method which will return an object with all of my data.So 1: I need to make an object(structure) from ...
Hi I've made a Swing Applet that imports some Borland libraries like :import com.borland.jbcl.layout.*;I've downloaded the latest Java plug-in but the browsersays class com.borland.jbcl.layout not found.What must I do in general to avoid that kind of errors?Thanks ...
346 byte By
mgl0902 at 2007-9-26 1:16:27
what's the problem with the .length method here?String date = new String[5];date[0] = "Hello1";date[1] = "Hello2";date[2] = "Hello3";date[3] = "Hello4";date[4] = "Hello5";System.out.println(date.length());The system says that it can't find length method.Thanks ...
689 byte By
Cordeiro at 2007-9-26 1:16:28
I have a certain object that contains two public HashMaps. According to documentation the HashMaps are not syncronized by default, although its possible to have it syncronized using some methods on the Collection interface.These HashMaps are only populated at the beginning of the process by a ...
223 byte By
dshen at 2007-9-26 1:16:29
HelloIn my Java program, I would like to launch a Netscape with one file as parameter in order to see the file with Netscape. Is there someone who can tell me how to do that, thanks.danfei
1388 byte By
ukdevcom at 2007-9-26 1:16:38
Hi there.I'm trying to create a Java class that I can call from Coldfusion that will build a GIF file based on parameters.The idea is, the Java object opens a "background" gif file and then writes some text onto it and saves the whole thing out as a GIF.Bearing in mind this class will be used ...
Hello, I was a Visual Basic programmer; in VB I was able to connect more than one event to the respective function.In JAVA I do:button1.addEventHandle(...................but in this way I can associate only the "click" event.I want to define, for example, the "KeyPress" event on a JTextField, ...
427 byte By
as116416 at 2007-9-26 1:16:41
Hi!I have a java applications that makes transactions. I haveconfigured 256 MB of heap memory. But when the java process carries "n" transactions, it is goingvery slow. However I have changed to 128 MB of heap memory andI haven't had any problem with the java process.Why with 128 MB it's ok ...
185 byte By
fk1980 at 2007-9-26 1:16:43
How can I covert an Class file (.class) to EXE (.exe for windows platform) while using J2SDK? Please tell me the complete process. I really need this as early as possible.
448 byte By
csr333 at 2007-9-26 1:16:46
Hi All,I would like to make an application to send & recieveSMS messages from a mobile phone which is connected to my computer through nokia data cable.Using the javax.Comm package it looks that theapplication recognizes the port and I can interactwith it, but how can I send a SMS message? ...
THIS IS MY FRST QUESTION HERE ...SO A WARM HELLO TO ALL.PLEASE TELL ME HOW TO USE A CALLABLE STATEMENT WITH MS ACCESS WITH THE HELP OF A EXAMPLE.
329 byte By
Lesco at 2007-9-26 1:16:49
Seems that my first post didn't work.. so i try another time.I'd like to get the size (width and height) of an image file, just using the path of that file.Does anyone knows if there is an existing class that can allow me to, or does someone knows the way i should work on itThanks in advance ...
I've created an applet that takes a fair while to load in a browser. Does anyone know an easy way of writing to the screen while the applet loads so the user can be kept informed of the progress of the applet?
442 byte By
JAVA-GUY at 2007-9-26 1:16:54
Hi,I'm still developping my html editor.Here's my problem :when i apply an AlignmentAction (StyledEditorKit.AlignmentAction ("Align Left", StyleConstants.ALIGN_LEFT) in the JEditorPane,it is displayed correctly but not saved in the HTML format . So when i save the document from the JEditor ...
I am having an applet with some textfields. I want to pass these form variables using POST method to ASP script which is a preview page. ( with Request.Form("formvariablename") ) I tried following test script but the button seems as if not having any action. What is wrong ? Please help. It will ...
I am having an applet with some textfields. I want to pass these form variables using POST method to ASP script which is a preview page. ( with Request.Form("formvariablename") ) I tried following test script but the button seems as if not having any action. What is wrong ? Please help. It will ...
211 byte By
siv-viv at 2007-9-26 1:17:01
well what im trying is that a java application should read a INI file while it starts , how can i specify a java program to read a INI file when it starts.any help is welcome with utmost gratitude.
231 byte By
siv-viv at 2007-9-26 1:17:04
well what im trying is that a java application should read a INI file(initialization file) while it starts , how can i specify a java program to read a INI file when it starts.any help is welcome with utmost gratitude
93 byte By
naveentr at 2007-9-26 1:17:07
I want to get a scroll bar in jtextarea when required without using scroll pane
517 byte By
2Fat at 2007-9-26 1:17:08
HiIm creating a program that connects to a MySQL database. Everything works perfectly and my select queries shows up in a JTable. My problem is deleting more than one row when selecting the rows from my JTable. I think im using the wrong SQL syntax so if anyone could show me the syntax, it ...
188 byte By
98028140 at 2007-9-26 1:17:13
i want to set a maximum size for a text field.for example it is 3 and after it gets 3 characters the pointer must pass to the next text field.how can i do that?
144 byte By
98028140 at 2007-9-26 1:17:14
how can i iconize a window to the trace bar (the bar at which the clock works)?and how can i add a popup menu to that icon?
Hi !I have an instance of a classDevisen dev = new Devisen();In an other class I have a static method and I need there the content of some variables from dev.public static void abc(){ String text=dev.textfield.getText()}I get the errormessage, that the I cannot use the Not-static variable dev ...
148 byte By
98028140 at 2007-9-26 1:17:16
i dont know how to run an program with in a java program.for example, how can i start winamp when i click a button on my frame?
Hello all, I'm a newbie in JAVA whose want to store int values (coming from a resultset) into an dynamic array. I know that normally to create a "dynamic array" you'd better use a Vector, but it seems that I don't know how to use it correctly (throws me a exception as : Incompatible type ...
Hi all,I am dealing with a search page which is having 8 search fields. i have a way for individual search fields. but i need to have multiple search.. with any to any combination in all the 8 fields. for this I need a List or an ArrayList which can hold Lists aagain. Eg: List a = null; List b ...
Hi all,I am dealing with a search page which is having 8 search fields. i have a way for individual search fields. but i need to have multiple search.. with any to any combination in all the 8 fields. for this I need a List or an ArrayList which can hold Lists aagain. Eg:List a = null;List b = ...
828 byte By
LoCal at 2007-9-26 1:17:26
Hi,I guess my code is correct, but somehow the server does not receive the stream (i dunno if client or server error) here are codesnippets ->//serverServerSocket adminstrumpf = new ServerSocket(31337);while(true) {Socket dc = adminstrumpf.accept();InputStream in = ...
Hi!I have an html editor getting displayed in the browser.my requirement is to read a html file and display the contents as such in the editor window.But what is happening is,the browser is parsing the html code and displaying it.For eg:- if my html file has code for displaying a button,the ...
776 byte By
marikkan at 2007-9-26 1:17:28
Hi, I get the error in the subject when I use it with the following code in an applet.try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection = DriverManager.getConnection(url, username, password); }catch (Exception e) { e.printStackTrace(); name.setText(e.toString()); connection = ...
What is the comparison of the cost of adding an object in Vector and in an ArrayList ( for which adding an element has constant amortized time cost).
179 byte By
hande123 at 2007-9-26 1:17:36
When a Node in the JTree contains text that is wider than the JTree width, is there a way to refresh the JTree to resize itself to show the full text.Regards.
330 byte By
dupsy at 2007-9-26 1:17:38
I am having problems with customising a JDialog to my own needs. I want a modal JDialog box that has a JTextField and 2 JCheckBoxes and the input typed in the JTextField as well as the selections made on the JCheckBoxes are passed to the main window from which the JDialog box was opened.i need ...
hi, all a problem confused me and so urgent.and now I have a servlet to process the file uploaded from browser and it can work successfully. and I want to upload many files from java application program using this servlet. I used URLConnection, but how to do, who can give me some example?thanks ...
559 byte By
amit_vj at 2007-9-26 1:17:42
hi friends,i need ur help for one interesting problem i m facing.I want to read a txt file and wanna display the text from that file into an html, using a servlet.A txt file contains sentences( words with spaces in between ).When servlet reads the file, it is reading the whole sentence ,but ...
Hi, A make a simple copyInto statment that is crashed and I don't understand why ?Thanks in advance.Here is a snipset of my codeVector v= new Vector();String[] labels=new String[v.size()];log=rs.getString("ORIG_SUBMITTER");v.add(j,new String(log));v.copyInto(String[] labels); ...
HiHow can one convert his existing application which uses JFrames and a main method() to an Applet which extends JApplet and invokes init()?Perhaps I could write a small applet which creates an instance of my application but my application uses it's own frames and GUI.How do I make them appear ...
when i try to compile i get the following error:Addition.java:38: Type expected.plusButton.addContainerListener(this);^Addition.java:49: Type expected.calcButton.addActionListener(this); ^does anyone know what i should insert to compile properly ...
973 byte By
agilbull at 2007-9-26 1:17:49
I want to cast an Object to a javax.mail.MultipartCompilation OkBut i have this message : java.lang.ClassCastException: com.sun.mail.util.SharedByteArrayInputStream when using the bean with JSPHere are the sources :public Monmail(Message mess) throws IOException ,MessagingException {DebugWriter ...
2266 byte By
jpifer at 2007-9-26 1:17:52
I'm trying to write some very simple code to get data from a file amd then do stuff with it. I'm trying to download the file but it's not happening. With forum help I can sucessfully connect now and change to the right directory. When I try and get the file it's not downloading. I've tried ...
173 byte By
sofyg at 2007-9-26 1:17:53
Sorry for stupid questions but What is the difference between java.exe and javaw.exe ?How can I check which JVM version is supported by java.exe?
Is it possible to redirect System.err for a single thread?I have a servlet that kicks off javac. I save the System.err PrintStream and I redirect System.err to an output file during the compile. After the compile is complete, I redirect System.err back to it's original destination and read the ...
599 byte By
ventural at 2007-9-26 1:17:59
Hello!I am an Italian student who studies Computer Science at Pisa University, and I am developing some projects in Java using Java 2 Standard Edition (J2SE) and Java 2 Micro Edition (J2ME, for MIDP 1.0 compliant devices). I need to know if there are some Java API(for J2SE and J2ME) to send SMS ...