3,927 Posted Topics

Member Avatar for aabundle

Bleh, got back to this thread just a little too late I guess, but perhaps you will still see this post. If you wish to organize the UI sections in a more modular and manageable way, you might consider this arrangement[code=java] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Interface …

Member Avatar for aabundle
0
216
Member Avatar for wonder_laptop

This really has nothing to do with Java and a quick search would have yielded an answer: [url]http://en.wikipedia.org/wiki/32-bit_processor[/url]

Member Avatar for wonder_laptop
0
132
Member Avatar for kira4

You can't at this point. The "EmailSender" class has no methods to interact with and is just a series of commands in main(). You'll have to re-write "EmailSender" to be a class with methods to set the parameters for the email and a send() method to send it. The interface …

Member Avatar for VernonDozier
0
140
Member Avatar for TheWhite
Member Avatar for jasimp
0
95
Member Avatar for neonic75

Add a stack trace to the catch block for ClassNotFoundException[code]} catch (ClassNotFoundException notfound) { notfound.printStackTrace(); lName.setText("Illegal Information in address book file ..."); }[/code]If your code above compiles and does not complain "symbol" not found about the "controller" class, then it's probably a class within "controller" that is causing your problem. …

Member Avatar for neonic75
0
277
Member Avatar for comjisu33

comjisu33, based on sukatoa's response it looks like your original code was quite different and you edited it after the response. If you make changes to the code, make a new reply with those changes instead of altering the original. After your edits, sukatoa's response seems to make no sense …

Member Avatar for comjisu33
0
120
Member Avatar for chweetnancy

What part is "wrong" in your estimation? Wrong is a pretty broad area. Just glancing at the smooth() method it looks like a basic 3 point moving average. Where is the issue?

Member Avatar for jwenting
0
107
Member Avatar for ravikiran.s

"execution is stopped" isn't a lot of information to go on. You have an exception? What is it exactly? The code just never returns from that method? You're going to need to give a little bit more detail on your issue if you expect anyone to offer some advice.

Member Avatar for ravikiran.s
0
120
Member Avatar for thatnewbreed

Well, you didn't ask any questions. You just posted your assignment, and certainly no one is going to just write it for you. Post the code that you have written for the assignment and specific questions or error messages that are giving you trouble.

Member Avatar for javaAddict
0
123
Member Avatar for Silx

You probably need to flush the Image resources. Try adding this to see if it gets rid of the cached image[code]ImageIcon oldIcon = (ImageIcon)jLabel3.getIcon(); oldIcon.getImage().flush(); Icon icon = new ImageIcon("graph.png"); jLabel3.setIcon(icon);[/code] Is there a reason that it has to generate a .png instead of rendering directly to the screen?

Member Avatar for Silx
0
81
Member Avatar for MxDev

Take a look at [URL="http://java.sun.com/javase/6/docs/api/javax/swing/JTree.html"]JTree[/URL] and [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html"]How To Use Trees[/URL]. If you don't want to use a JTree then you'll have to decide just how you want to represent that data and how you want to interact with it.

Member Avatar for Ezzaral
0
101
Member Avatar for msnider9

I think your trouble is actually these two lines[code] buttonCalc.addActionListener(this); buttonClear.addActionListener(this);[/code] because you never initialize those buttons. There is nothing wrong with the line that you posted.

Member Avatar for masijade
0
106
Member Avatar for guerreronoli

Just call [URL="http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)"]DefaultTableModel.removeRow(int)[/URL] on the TableModel. You will need to cast it to DefaultTableModel to call that method, since it is not part of the TableModel interface.

Member Avatar for Ezzaral
0
1K
Member Avatar for Taz x

[QUOTE=Taz x;590907]im doing a java project on creating a music database, i need to store an array of cd objects, each entry in the array will be a single object for a cd. The objects are: Artist, Album, No of tracks could sum1 point me in d right direction, thanks[/QUOTE] …

Member Avatar for javaAddict
0
255
Member Avatar for ells912
Member Avatar for jwenting
0
107
Member Avatar for majestic0110

This tutorial might provide a starting point on the design: [url]http://www.javacoffeebreak.com/text-adventure/index.html[/url]

Member Avatar for majestic0110
0
693
Member Avatar for Kusno

Check your project properties and make sure that in "Libraries" you have selected the 1.6 platform and that in "Sources" you have selected JDK 6 for "Source/Binary Format".

Member Avatar for Ezzaral
0
148
Member Avatar for Someguy02

Also, with the basic structure that Peter showed above, if your game classes extend JPanel (or a similar container class), you can swap that game panel in to replace your menu panel and then swap it back if they exit the game.

Member Avatar for darkagn
0
92
Member Avatar for eranga262154

If you have a reference to the Element you can simply use the Element.setTextContent(String) method. After you have updated all of the DOM elements as needed, just write it back to a file: [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html[/url]

Member Avatar for eranga262154
0
110
Member Avatar for skyineyes

You would be much less stressed if you paid attention in class and started your homework before the day that it was due. This forum is not a homework completion service. Good luck with your studies.

Member Avatar for jwenting
0
108
Member Avatar for imma.infotech

[QUOTE=imma.infotech;592186]i am preparing for placement..please help me to become expert in c,c++java...by tutorials[/QUOTE] Sorry to burst your bubble, but you are not going to become an expert in any of those through tutorials.

Member Avatar for Ezzaral
-1
120
Member Avatar for abdulraqeeb33

Start with a simple tutorial on JTable: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/table.html[/url] (These examples that you keep asking for are incredibly easy to locate with a very simple search. You should take a little initiative to find them before asking others to give them to you.)

Member Avatar for Ezzaral
0
174
Member Avatar for The Dude

[QUOTE=The Dude;585956]Hi guys... This is a petition against the [b]live[/b] skinning of cats,dogs and other animals in China. [/quote]Of course it's live skinning - the dead have a hard time handling knives. [QUOTE=The Dude;585956][b]Please be aware if you click on the video it is VERY GRAPHIC - the most disturbing,graphic …

Member Avatar for >shadow<
1
281
Member Avatar for chickenmcnugget

Sorry, not going to do your homework assignment for you. If you want to post what code you do have done and ask specific questions, someone may be able to provide some advice.

Member Avatar for chickenmcnugget
0
82
Member Avatar for dimples09

Well, the only piece of the code you wrote that will be of any use for that assignment at all is the Scanner (though a BufferedReader would be my own choice for that). The instructions are pretty clearly laid out and does tell you what you need to use from …

Member Avatar for dimples09
0
165
Member Avatar for welbyobeng

After you have computed the quarterly totals and before you display the differences seems like a pretty good candidate.

Member Avatar for welbyobeng
0
89
Member Avatar for Dani

They're great! I find myself annoyed now at other forums that don't have them :)

Member Avatar for ~s.o.s~
0
98
Member Avatar for yassar

You have executed a new query here through your statement so the result set you obtained with that statement is no longer valid and you cannot retrieve field values from it.[code=java]stmt.execute( "DROP TABLE " + rs.getString(1));[/code] Create a separate statement object to make your "DROP TABLE" calls with.[code=java]PreparedStatement updateStmt = …

Member Avatar for Ezzaral
0
151
Member Avatar for Xctive

In the first version you declared that the method returned a double value, but it does not return anything at all - hence that "missing return statement". If your method declares a return type, it has to return a value of that type.

Member Avatar for Xctive
0
79
Member Avatar for nsuleiman

Well, the documentation at [url]http://www.superwaba.com.br/en/default.asp[/url] would certainly be the best place to start. This has little to do with the standard Java APIs.

Member Avatar for Ezzaral
0
137
Member Avatar for tehpirate

The code to read into the array looks reasonable enough, though your while loop should use scanner.hasNext() to determine if more tokens are available before calling next() and you will need to guard against overflowing your array length. The code at the top to read the text file is never …

Member Avatar for Ezzaral
0
88
Member Avatar for K504K

Well, I guess that depends on what you have covered in class so far. My guess would be simple file I/O with a BufferedWriter. Review your class notes.

Member Avatar for K504K
0
194
Member Avatar for harisagar

[QUOTE=harisagar;589644]help me or keep quiet i don't need your suggestions:angry:[/QUOTE] I think you just threw all of your chances for any help here right out the window.

Member Avatar for jasimp
0
139
Member Avatar for Venks

You can't set the system time in Java without making system-specific calls through a Process or with JNI.

Member Avatar for Ezzaral
0
97
Member Avatar for jimJohnson

You just used the wrong method call for the Frame sizing - easy to fix. [URL="http://java.sun.com/javase/6/docs/api/java/awt/Window.html#setSize(java.awt.Dimension)"]setSize()[/URL] will take either a (width,height) or a Dimension argument. There is another method [URL="http://java.sun.com/javase/6/docs/api/java/awt/Window.html#setBounds(int,%20int,%20int,%20int)"]setBounds()[/URL] that takes (x,y,width,height), which is probably the one you are trying to use.

Member Avatar for jimJohnson
0
185
Member Avatar for dakrous

Use String.split(), which will return an array of Strings that result from the split on your expression. You can then work with the characters in the string from that portion separately.

Member Avatar for dakrous
0
125
Member Avatar for techbound

[QUOTE=techbound;586575]I am unsure of the author because it didnt state it, but anyway here it is.[/QUOTE] Nope. It was lame.

Member Avatar for joytech22
0
141
Member Avatar for kv79

[QUOTE=kv79;588425]I know the answer on my question .[/QUOTE] That's good - because most of us could not understand it to offer you one :P

Member Avatar for jbennet
0
149
Member Avatar for beatlea

You have to cast them to the appropriate type if you wish to call methods on them. To call ArrayList methods on an Object you retrieved you would do this[code]ArrayList retrievedList = (ArrayList) otherBigList.get(0); retrievedList.someListMethod();[/code]That's the technical aspect of it. The bigger question is why are you storing a mixed …

Member Avatar for beatlea
0
173
Member Avatar for DickLaurent

Yep, you are still missing the close of some block or expression. Check the braces, semi-colons, and parenthesis in the code above the [icode]public double match(String addr)[/icode] line. Strict adherence to proper indentation will help a lot in seeing structural errors like this.

Member Avatar for DickLaurent
0
142
Member Avatar for techbound

I think that would depend upon how long pondering the question held you up.

Member Avatar for techbound
0
151
Member Avatar for Adila
Member Avatar for aim

JAI offers plenty of functions for your task, but if you are expecting to find some "MatchImage" API you are probably out of luck. You have to code such algorithms yourself because there are many ways to go about it.

Member Avatar for aim
0
113
Member Avatar for KimJack

Not sure what you are doing with the "hash.t..." stuff there and the whole operation seems odd, but this will put "elephant" and it's value from "hash" value into hash2[code=java]hash2.put("elephant", ((WhateverClassForAnimal)hash.get("elephant")).getDescrip());[/code]If you typed the HashMaps with generics then you can drop the cast to WhateverClassForAnimal.

Member Avatar for Ezzaral
0
116
Member Avatar for D boss

It looks like you are trying to execute that from the command line directly ("java Draw"). Applets cannot be run like that. They need to be embedded in a web page or run through the AppletViewer. You can find more info in the Applet tutorial: [url]http://java.sun.com/docs/books/tutorial/deployment/applet/deployindex.html[/url]

Member Avatar for D boss
0
87
Member Avatar for 9107you

Use English, not "text-speak", and first make your own attempt at your homework. Please read the rules and FAQ for the terms of the forum.

Member Avatar for javaAddict
0
127
Member Avatar for roverfind

Trying to Find the imp in the system that has been Needlessly Capitalizing Words and stealing Punctuation Whats Up With You

Member Avatar for kv79
0
129
Member Avatar for gehher
Member Avatar for WalkmanXD

And what problem would that be? The JVM manages the memory allocation when an object is created and the garbage collector frees that memory when there are no more references to the object. What exactly is your question?

Member Avatar for jwenting
0
248
Member Avatar for Katherine692008

On a side-note, change your class name and variable names to something less meaningless. Descriptive names for classes, variables, and methods are immensely helpful to both you and others who read the code. Also, after 22 posts here you should get familiar with [noparse][code] [/code][/noparse] tags and [U]use them[/U].

Member Avatar for Ezzaral
0
133

The End.