31,001 Topics

Member Avatar for
Member Avatar for ceyesuma

Hello. I have search my app for all classes to implement java.io.Serializable. I think that the needed classes are covered.I create and serialize JInternalFrames. When I re-open a JInternalFrame some of the JMenuItems do not do thier job. Also when I right click the Tabs on the JTabbedPane to bring …

Member Avatar for ceyesuma
0
78
Member Avatar for blknmld69

I am having a problem get my program to compile. [B]ERROR[/B] Stopwatch.java:35: cannot find symbol symbol : method start() location: class Timer timer.start(); ^ Stopwatch.java:44: cannot find symbol symbol : method stop() location: class Timer timer.stop(); ^ Stopwatch.java:52: cannot find symbol symbol : constructor Timer(int,Stopwatch) location: class Timer timer = …

Member Avatar for JamesCherrill
0
646
Member Avatar for incubus9x9

Please dont tell me to "google" it obviously I'v tried everything and this is my last resort. k thanks :) ok so I have to set a value to be restricted in the constructor ___________ Modify the constructor and set methods of the Shape class to verify the values of …

Member Avatar for seanbp
0
204
Member Avatar for rayden150

its a basic calculator that sums number and i want to make a GUI for it but i dont know where i messed up please help [CODE] import java.util.Scanner; import javax.swing.*; public class Sum { public static void main (String args []){ Scanner result = new Scanner(System.in); int num1; int …

Member Avatar for masijade
0
86
Member Avatar for spades0001

I was reading and researching about adding color into my program. I found this code, which compiles perfectly, but does not show the desired outcome. Here's the code: [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.awt.Color; import java.awt.Graphics; public class Login extends JFrame implements ActionListener{ private JTextField …

Member Avatar for masijade
-1
117
Member Avatar for Awesomeness

I want to remove all the spaces, carriage returns, and "comments" (the text inside the <>'s) from this document: I tried the regular expression [ICODE]( )|(\n)(|<.*>)[/ICODE], but that removes everything but the [ICODE]-1[/ICODE] at the end. It doesn't do that if I remove the [ICODE]|(<.*>)[/ICODE], but then it doesn't remove …

Member Avatar for masijade
0
94
Member Avatar for ejsuarez

Hi! I'm new around here and I'm not quite sure how this works, but the main reason I subscribe to this web page is because I'm looking for someone who can write a program for me. I've done a little bit of it, probably 10% or less but I need …

Member Avatar for ejsuarez
0
107
Member Avatar for adityagarwal

[CODE]public void takeGuess () throws IOException { temp=" "; Hangman obj = new Hangman(); System.out.println ("Enter a character or type in 'hint' for a hint!"); DataInputStream input=new DataInputStream(System.in); temp= input.readLine(); if (temp.length()==1) { guess=temp.charAt(0); if ((guess >= 'a' && guess <='z') || (guess >='A' && guess <='Z')) {System.out.println();} else {System.out.println …

Member Avatar for jon.kiparsky
0
499
Member Avatar for serph09

The question asks: Enhance the [I]addInterest[/I] method of the [I]SavingsAccount[/I] class to compute the interest on the minimum balance since the last call to [I]addInterest[/I]. [I]Hint[/I]: You need to modify the withdraw method as well, and you need to add an instance variable to remember the minimum balance. (Oh, and …

0
97
Member Avatar for SerialSpiller

Here's what I got so far. I am trying to add the two fractions together while following the UML. I attached the assignment to this as well. I have no Idea how to create the add method. It's for an online class, and this one is just killing me. Thank …

Member Avatar for jane010794
0
1K
Member Avatar for red7devil

Hi guys, im facing a real problem with a project im doing at the moment as Im new to Java. Ive set all the buttons for the program however, i need to make the pictures show randomly. also, il need to make some buttons work, like the nudge button for …

Member Avatar for sirlink99
0
136
Member Avatar for jemz

hello can you help me please how can i make the function array...please help me because i have no idea for this...thank you in advance hoping for your positive responds...

Member Avatar for jemz
0
72
Member Avatar for lockwater

SINGLE USER CONTIGOUS SCHEME: INPUT THE SIZE OF MEMORY DISPLAY THE SIZE OF THE OS BY COMPUTING 20% OF THE MEMORY INPUT THE NUMBER OF JOBS EXAMPLE: IF THE NUMBER OF JOB IS ENTERED THE SCREEN WILL GIVE YOU AN OUTPUT LIKE THIS JOB 1; JOB 2; JOB 3; JOB …

Member Avatar for lockwater
0
107
Member Avatar for mslavkova

I have a problem how to transfer my European CApitals Array into JLabel Array, without writing the capitals on each JLabel. I figured out my dropdown menues, but I want to display the counties on JLabels and parallel to it, the textboxes for the capitals, with the JButon next to …

0
84
Member Avatar for LianaN

Hi! I would like to create textfields that will serve for sorting data in JTable, and the width of these textfields will correspond to a column width. So, below you may see the code that worked until I did not use an array of textfields. Now, the size of [ICODE]txtRegNum[/ICODE] …

Member Avatar for quuba
0
124
Member Avatar for kyojin

Can somebody help me change the rectangle to an oval? I try importing the Ellipse but it doesnt work :( [ICODE]import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.TexturePaint; import java.awt.geom.*; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import javax.swing.JFrame; import javax.swing.JPanel; import com.sun.image.codec.jpeg.ImageFormatException; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageDecoder; …

0
57
Member Avatar for Tankadin

Hi all! I have moved on to learning about classes.....they don't seem as bad as the past things I have done so far. I have, however, hit a few snags along the way. Here is my code for my Rectangle class [code] public class Rectangle { private int x; private …

Member Avatar for quuba
0
415
Member Avatar for Helpjava11

Please help I am brand new to java I need help creating the java code so that when I click a button it will add .01 to a running total. I have tried to modify a calculator code but it did not work. Any help at all. Thank you

Member Avatar for Helpjava11
0
137
Member Avatar for hbk619

I'm writing Solitaire in java and have each column of cards set up as a 2d arraylist of JLabels, one label hads the icon and is painted to a jpanel. The other contains the url for the image as the text of the label. Below is part of the code …

0
80
Member Avatar for Nickl246

Hi there, I'm working on a 'queue program' which will queue 30 job numbers(case 1) between 1 and 30, validated, in an array, display the array , (case 3) and remove a number from the back of the queue.(case 2) I have the display array and remove from front of …

Member Avatar for Nickl246
0
183
Member Avatar for Theformand

Hey guys. I have a headache here as im new to Java. Ive tried searching, but found nothing that really helped me out. forgive a noob :) Im trying to split a string from a textfile with the following format: 0 0 0 0 0 0 0 0 0 110 …

Member Avatar for JamesCherrill
0
161
Member Avatar for Dhruv Gairola

this is inside my servlet: [CODE]ArrayList<String> currentCustomer = model.getAllCustomers(); req.setAttribute("currentCustomer", currentCustomer );[/CODE] how do i access this arraylist in my JSP file? I eventually wanna loop over each string element.

Member Avatar for Dhruv Gairola
0
234
Member Avatar for ravindraravi

Just I am confused to choose which type of programming language for project development....

Member Avatar for Dhruv Gairola
-1
78
Member Avatar for someone5

Hi I wanted to know how to do this: - when the user clicks on a index in listbox from classA - the value of that index(written in classB) will go into the textbox from classC I have already written the coding for classA I just need help writting the …

Member Avatar for stultuske
0
98
Member Avatar for deniseblue

[ICODE][/ICODE]Hi, I am trying to figure out how to start my next Inventory program part 4. What I wish to know is 1. Do I choose a New Project or choose New File? What I have been doing so far is choosing New Project. All the programs are extending from …

Member Avatar for stultuske
0
78
Member Avatar for sharkbate24

Hello, I basically have 2 GUI windows in my project. Just to explain it better, let's call the 2 GUI windows: - Window A - Window B In Window A, there is a variable that I want to change, but I have to change the value of the variable in …

Member Avatar for sharkbate24
0
219
Member Avatar for merdzins

Hi all! I am extremely new to java and to computer programming in general so I greatly appreciate all our help. Here's my problem, I am trying to write a program that reads in a basic text file with some names and some numbers, and inputs the given information into …

Member Avatar for JDCyrus
0
100
Member Avatar for Kuroshi
Member Avatar for noydoy

[CODE]import javax.swing.*; import java.awt.*; class Calculator{ JFrame frame; JPanel panel1, panel2; JTextField textField; JButton button[]; Container contentPane; void launchFrame(){ frame = new JFrame("My Calculator"); panel1 = new JPanel(); panel2 = new JPanel(new GridLayout(4,4)); textField = new JTextField(10); button = new JButton[17]; for (int i=0; i <10; i++) button[i] = new …

Member Avatar for noydoy
0
412
Member Avatar for JDCyrus

Hello. It's been a while since I was on here. I'm writing a Java class with a generic type parameter. Among other things, it maintains an internal ArrayList of the same generic type as itself. In a perfect world, the code would go like this: [CODE=Java]import java.util.ArrayList; public class MyGenericClass<T> …

Member Avatar for JDCyrus
0
181

The End.