32,204 Topics

Member Avatar for
Member Avatar for talablink

how do you add a key listener to a java GUI? can anyone pls show me how... or at least give an example..pls:) cause I want to add a key listener to my GUI calculator but I don't now how or where to put it and stuff...:-/ thanks...

Member Avatar for phamvantu_ctk30
0
158
Member Avatar for farzanehmif
Member Avatar for kahaj

For some reason, line 67 is saying, "variable ddOption may not have been initialized. However, on lines 80 & 93, that variable is used and works just fine. Any idea of what's wrong here? (I omitted some of the code in the middle section. [code] //ShapeCalculator.java import java.util.Scanner; public class …

Member Avatar for kahaj
0
117
Member Avatar for sweebez

Hello! I'm having a bit of confusion here regarding toStrings and Constructors. Namely, why would you ever need them? I have a project for my course, and in it, I use a method that checks for a creature's "energyLevel" to see if that creature is still "alive". This method returns …

Member Avatar for 0805638
0
634
Member Avatar for llemes4011

Hello everyone =) I'm a Java programmer who wants to do work with databases. MySQL seems to be a popular choice, but I don't know where to start. I messed around with Derby, but I didn't really understand what was going on. If anyone could point me in the direction …

Member Avatar for peter_budo
0
119
Member Avatar for abhi_marichi

How the JAVA compiler was developed????? What language and compiler they used to develop it.... and what factors made it platform independent.... If I want to write a language and a compiler and make it platform independent how can I do it....... Please help me out with answers........ Please......Please

Member Avatar for 0805638
-1
109
Member Avatar for 0805638

I use the IDE Netbeans and as a personal project I want to create an application in java similar to "Mac OSX" dock bar. I dont know how to run the coding using the GUI...all I have done so far are database structures and commandline programming. I will need to …

0
62
Member Avatar for valleymorning

Dear all, I have been told there is something wrong with the following code. Could someone please shed a light on this, I'd be greatly thankful to your help. VM ---------------------------------------------------- [code] Identify the problem in the following code: // Retry three times on failure to open file. int retryCount …

Member Avatar for masijade
-1
82
Member Avatar for carl9999

There's an error regarding the scanner and i'm honestly not sure how to make it work i'm using javac as a compiler, please help me solve this issue, ive been trying for hours [code]import java.util.*; public class testing { public static void main(String[] args) { String forename; String surname; String …

Member Avatar for carl9999
0
97
Member Avatar for whiteyoh

Hi all, im very new to java i would like to know how to add the following objects into an array [code] CD cd1 = new CD("Kaiser "," up the khazi ", 9.99); CD cd2 = new CD("Oasis "," morning glory ",3.99); CD cd3 = new CD("Bob Dylan "," Alreet …

Member Avatar for Ezzaral
1
490
Member Avatar for kat1

I am using java.io package in my j2me programe in order to use PrintWriter but package does not show PrintWriter option nor it shows BufferedReader option , why this happen ??i do not know.if any one knows the solution plz tell me.is it require any specific library???? plz help me …

Member Avatar for sincerelibran
0
108
Member Avatar for Teethous

[TEX]Hey everyone, I am having a problem with converting my character array. The program runs, but in the display box I get little squares instead of a string. The program should display the first char of the fist name, the first five of the second name and a random number …

Member Avatar for Teethous
0
179
Member Avatar for manish27896

Hi , I need one help. For one of my project requirement, I need to extract contents of RPM package and I have to write Java program for the same. Do anybody have any idea how to do that. Drop me a mail at [email]manish27896@gmail.com[/email] if anybody knows solution for …

Member Avatar for masijade
0
36
Member Avatar for guilh_22

Hi everybody, I need some help with my first Java program. My teacher don't teach really good ... I have a problem to solve in my script. At that time all are okay but all number must be rounding to 2 decimal :S That's all my Java program (He is …

Member Avatar for javaAddict
0
132
Member Avatar for devidayalan

Hello, i need to create a webservices from the wsdl file using jaxws.Can anyone tell me how to do this in netbeans.it will be helpful if you explain me the helloworld sample in this regard. Providing the link for any article or tutorial is also welcome.Kindly help am new to …

Member Avatar for pooja.ui7
0
417
Member Avatar for keekee

My code runs fine, but I keep getting this error message: I would like to change this logo from a paperclip logo to a book logo, my code is under the error. Can you tell me what's wrong and how to change it to a book logo? Uncaught error fetching …

Member Avatar for masijade
0
93
Member Avatar for ssdharan03

I'm doing my college project on SAN Monitoring.. As a first phase, I've been asked to get my harddisk's free space and total memory in java using a tool called WBEM Services.. Can someone help me out in carrying out this task??

0
35
Member Avatar for kahaj

How would I draw a shape in an applet and have the border one color with the fill a different color?

Member Avatar for kahaj
0
83
Member Avatar for gunjannigam

I needed to draw an image and paint a needle on it. Since my image is stationary(it doesnt change) I dont want to paint it each time I call repaint. Thats why I thought of using JLabel with an Icon image. The problem is I cant paint anything on top …

Member Avatar for gunjannigam
0
249
Member Avatar for javanub123

i know how to draw 2D shapes just fine but how would i draw 3D ones? if thats even possible. please help, thanks =)

Member Avatar for Ezzaral
0
68
Member Avatar for TaP1227

This program provides the user with options of what kinds of passwords they want, then they can choose from those menu options, then enter how long they want their password to be. The program is supposed to generate random ASCII values for the password(what it is composed of is based …

Member Avatar for TaP1227
1
131
Member Avatar for nagatron

Hallo to all, I need help on how to put a radio button on the coordinates I want. . .I have this map program and I want to place the radio button on the specified place on the map. I don't know how. . .I have attached an image of …

Member Avatar for nagatron
0
193
Member Avatar for EddieC

Urbancode today unveiled AnthillPro 3.7, the latest version of its build and deployment automation tool that piles seven popular source code analysis tools onto its [url=http://www.anthillpro.com/html/products/anthillpro/tool-integrations.html]list of third-party integrations[/URL]. There's also support for the GIT repository and DB2 and PostgreSQL databases, the company said today in a statement. Anthill Pro …

0
331
Member Avatar for MMD88

This one I almost have figured out (I believe). it is a program that takes a String in the main class and calls on a method to count the vowels inside the String. I then have to count each vowel (a,e,i,o,u) and input the total number of vowels (separately) into …

Member Avatar for MMD88
0
735
Member Avatar for llemes4011

Hi everyone. I know that asking for project ideas is generally frowned upon, but I wish to ask anyways. This isn't for school, it's just because I want to. I want to start writing applications that would be used in a business or workplace environment. I don't have a lot …

Member Avatar for llemes4011
0
243
Member Avatar for whiteyoh

Hi All, I have an array of 3 objects stored in cdList. Because I have now added them to an array, the usual method of displaying no longer works: [code]System.out.println(cd1.getArtist() + " " + cd1.getTitle() + " " + cd1.getCost());[/code] My questions are...... how would i amend to output the …

Member Avatar for whiteyoh
0
80
Member Avatar for whiteyoh

Hi, Im fairly new to java and im working my way through a load of exercises and im a little bit stuck on something. I have two classes, one of which holds the main, which creates 3 objects. I would like to know how to how to count the total …

Member Avatar for whiteyoh
0
264
Member Avatar for BestJewSinceJC

It took me very little effort to put a JComboBox in a JTable so that when the cells in a certain column are clicked, it lets the user choose from a drop down list of items. However, my program requires that the underlying combo box can change, since the list …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for theo19

[CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Calc extends JFrame implements ActionListener{ JFrame frame; JPanel textfield1,textfield2,rowpanel,calcb,mainpanel; JTextField display; JButton[] b; public Calc(){ frame=new JFrame("Calculator"); textfield1=new JPanel(); textfield2=new JPanel(); display = new JTextField(16); mainpanel = new JPanel(); textfield1.setLayout(new GridLayout(4,6)); textfield1.add(display); textfield2.add(textfield1); //array String[] cbuttons = {"7","8", "9","/", "4", "5", …

Member Avatar for BestJewSinceJC
2
190
Member Avatar for Stefano Mtangoo

Hi All, I'm starting learning Java and I need online tutorial. I have benefited a lot from site [url]www.zetcode.com[/url] and I would like to have summarized and "well-for-beginner" tutorial. Many of Java tutorials I find are a bit confusing to newbie like me. I'm not new to programming (a lot …

Member Avatar for Ezzaral
-3
116

The End.