3,978 Topics

Member Avatar for
Member Avatar for VernonDozier

I have a problem that I have "solved" in that it now does what I want, but I'd like to know why it works. I have a JFrame. Within that JFrame I have three JPanels, which I'd like the user to be able to adjust. I would like to be …

Member Avatar for VernonDozier
0
152
Member Avatar for er.prajna

In one page i insert data in textbox amd on clicking the submit button it will open a new page with the previous data(will retrived form database) that has been inserted using swing as desktop application in netbeans IDE6.0.we are able to insert data but unable to fetch it from …

Member Avatar for sillyboy
0
106
Member Avatar for TheWhite

This is actually part of a much bigger program, but I cut it down to the problematic area to make it easier to read. [code=java] import javax.swing.JButton; public class test{ static GameButton[] grid; static class GameButton extends JButton{ int value = 0; } public static void main(String[] args){ grid = …

Member Avatar for BestJewSinceJC
0
98
Member Avatar for lepetitevoddy

I have this wierd kink in this program, it keeps telling me that there is a "missing return statement for public static question. i'm kind of new to JAVA and i've tried everything! please can someone help! import javax.swing.JOptionPane; public class arithmetic { public static void main(String[] args) { JOptionPane.showMessageDialog(null, …

Member Avatar for ~s.o.s~
0
268
Member Avatar for realahmed8

I need little help in adding Sin & Cos functions to my calculater , and also in Layout (need textfield to be on the top), so please help me if you can.. that's my code: package javaapplication3; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.*; //import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Member Avatar for javaAddict
0
277
Member Avatar for sciwizeh

Ok, i'm trying to make two player, no-network pong. i don't know what the problem is, there are some very strange things happening... at the beginning of the program i try to set a y value to half the height, but it doesn't it stays at y=0 when the user …

Member Avatar for sciwizeh
0
140
Member Avatar for relequestual

Hi everyone. I'm new to this forum, recommended by a friend. I've just finished my first term at uni, and learnt some java. I'm creating a simple helicopter game in java, and have some issues using timers. The funny thing was, i started the project on my laptop, and it …

Member Avatar for Ezzaral
0
1K
Member Avatar for clueless101

[QUOTE]I'm working on a seemingly simple application that has 2 text fields and a slider. In the 1st text field the user enters an amount and the associated sales tax is displayed in the 2nd text field. Then, by moving the slider up and down the specified range, the user …

Member Avatar for stephen84s
0
186
Member Avatar for vspattanshetti

Hi all I work on a large network management product, with Swing based UI. Our product supports context sensitive help. The same works on Windows XP and on Windows Vista enterprise editions.. However it does not work on vista ultimate and business. When user clicks on help option in any …

Member Avatar for HoustonIT
0
70
Member Avatar for clueless101

[quote] Once again, I can get part of my code to work, but not all. When the user inputs more than one sentence [I](ending with either a period, question mark or exclamation point), [/I]each sentence should be capitalized accordingly. However, it only works with the first sentence to work. Does …

Member Avatar for ~s.o.s~
0
128
Member Avatar for Generalcoco

This is my Final Project and as you can see my program asks the users twice for the test grade I am trying to consolodate and have the program only ask for the test score once and give the letter grade at the same time.? any ideas I do not …

Member Avatar for Generalcoco
0
89
Member Avatar for clueless101

I'm working on a simple matching game, whereby my array includes 3 numbers:{ 5,9,0 } and the user tries to guess them. Instead, I want to use the Random class to generate 3 different numbers from 0-9, but I'm not sure how or where to start. I came across info …

Member Avatar for VernonDozier
0
92
Member Avatar for clueless101

[quote] My code asks a user for a password. To properly validate the user's entry, it must include the following requirements: 1)have a length of 5 2)have an uppercase character 3)have a lowercase character 4)have a digit My loop only works for the lowercase and length of 5 requirements. Can …

Member Avatar for clueless101
0
129
Member Avatar for babusek

HI Folks , Any one Here Name The Java Swing Component with "Date and Time Instance"? Thankq Sekhar

Member Avatar for masijade
0
154
Member Avatar for cproud21

I am to design an applet that produces a six sided polygon in which the coordinates are set according to the location of the mouse when it is clicked. I am struggling setting each of the clicks to the correct point. I have tried many things, however have not been …

Member Avatar for Ezzaral
0
171
Member Avatar for Blackeagle

in th following code, i cant use a Text Field in the actionPerformed methode .. the textFiled is declared outside that method. i get the following error: Cannot refer to a non-final variable serverHostField inside an inner class defined in a different method How can i solve this??? Thank you …

Member Avatar for stephen84s
0
99
Member Avatar for adigha

hello, i need to create an applet for a "company", in which you log in, and according to your possition(ex: worker, manager) you can see and change different objects such as sallery and the abililty to fire people. im completely stuck on the login part, i have the gui set …

Member Avatar for PoovenM
0
199
Member Avatar for krhillery

So I've spent the past 2 hours trying to work all of this out, but I am still getting an error message that seems out of place. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class HiLo extends JApplet { Image cardImages; /** * An image that holds the …

Member Avatar for krhillery
0
167
Member Avatar for littlebean21289

I have had to miss my last classes due to having to go to my doctor in order to prep me for surgery. My professor has placed the final assignment online and i have no where to begin. I'll take any help and would like to add that while i …

Member Avatar for BestJewSinceJC
0
150
Member Avatar for cproud21

I have the following code that produces an applet of two eyeballs. I have a mouseMotionListener that is set so that when the mouse is moved around the pair of eyes, the eyeballs follow the pointer. I have the eyeballs set up in four locations. To the left, right, north, …

Member Avatar for BestJewSinceJC
0
157
Member Avatar for christiangirl

This program is all working except when a user chooses the same file as before it needs to show both orders in the file but it is only showing the latest one. [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; /** * Program that allows user to select a …

Member Avatar for christiangirl
0
138
Member Avatar for krhillery

import java.awt.*; import java.awt.event.*; import javax.swing.*; public class HiLo extends JApplet { Image cardImages; /** * An image that holds the pictures of all the cards */ public void init() { /** * This method loads the card picture and lays out the applet. */ cardImages = getImage(getCodeBase(), "smallcards.gif"); setBackground(Color.blue); …

Member Avatar for Ezzaral
0
276
Member Avatar for Dan Bois

Hello I am new to java and i was woundering if someone could help me with this program. I was woundering how to put more balls into it and how to make the balls flash very fast almost like a strobe light. Please help thx. import java.awt.*; import java.applet.*; import …

Member Avatar for Ezzaral
0
66
Member Avatar for Ikah

Hello! I have an assignment where I have to take user input from my GUI (Month, date and year) and then send it to my CalendarUtil file where the input will be handled in the static methods. The part I an stuck on is the monthNumber method. I had written …

Member Avatar for Ikah
0
160
Member Avatar for littlebean21289

hi so i have just joined today but if i had known about this site i would have joined much sooner, i asked if anyone could help me with how i should post in the intro but dont wanna wait a day for a response so if i make any …

Member Avatar for littlebean21289
0
774
Member Avatar for ebiz

I have a button which opens up the file chooser. When a txt file is selected a Jframe appears with the data in. How do I change this, so the data displays in a JTable? Here is my current code package org.project; import java.util.*; import java.io.*; import javax.swing.*; public class …

Member Avatar for quuba
0
207
Member Avatar for christiangirl

Hello, I had to make this program and it is all working except it is not writting to the file. Can you help me out? Here is the code: [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; /** * Program that allows user to select a meal. * Includes …

Member Avatar for christiangirl
0
139
Member Avatar for jackieblock

I am working on a program to calculate mileage, fuel cost, and travel time when the user selects a vehicle from a combo box. It works well when reading from an array that I put in the program. But now I have to have it read the starting figures from …

Member Avatar for ~s.o.s~
0
153
Member Avatar for Dan Bois

Every time i try and run this program it gives me an error saying "cannot find symbol constructor AnimationThread" The error occures on line 26 I was woundering if someone could please please help me with this Thx!! import java.awt.*; import java.applet.*; import javax.swing.*; import java.awt.geom.*; import java.util.concurrent.*; import java.awt.event.*; …

Member Avatar for quuba
0
101
Member Avatar for miso66

Hi guys! I wrote program, which read data from file(you can modify this file) and than it paints in to JPanel containing Canvas.But it doesn't work. [COLOR="Red"][B]class MainWindow:[/B][/COLOR] [code] package my; import my.MyCanvas; import my.Rectangle; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import javax.swing.*; import javax.swing.border.*; import katka.Circle; import …

Member Avatar for peter_budo
0
109
Member Avatar for cproud21

The following applet that I have displays a house with two windows and a door that are colored in black. I want to display these items with window panes in them to show that they are open when the user clicks on them. I know that I need to use …

Member Avatar for Antenka
0
142
Member Avatar for VernonDozier

I am working on a program where there are several tasks that take time that users can implement. I would like a progress bar to pop up to inform the user how far the task has gotten. When the user presses a button on the main frame, I want a …

Member Avatar for VernonDozier
0
173
Member Avatar for ebiz

I wondered if anyone could help. I am trying to use a FileChooser in java. I have got the dialog box to appear and can select the file, but the box just displays "opening" and the file name. how to I add to the code to make it actually open …

Member Avatar for javaAddict
0
216
Member Avatar for christiangirl

I have this program all working, except in how the text looks in the file. The text is supposed to be all on different lines, but its all on the same. Here's the code: [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; /* * class LogOrder * Allows user …

Member Avatar for christiangirl
0
135
Member Avatar for christiangirl

I have to write two programs, one writes to file based on what the user selects. The other reads the file, and outputs what the user selects. And I'm really not sue if I'm doing this right. Here is what I have for writting to the file: [code]import javax.swing.*; import …

Member Avatar for vee_liang
0
85
Member Avatar for Acidburn

Hey guys, I've found this article showing how to manipulate itunes using java and com objects. However I dont really understand how it works, and can't seem to tell java to send a play / pause request. The event listeners works. [url]http://www.workingwith.me.uk/articles/java/itunes-com-with-java-and-swing[/url] Could someone try and expand on this? Or …

Member Avatar for priyankalakhe
0
149
Member Avatar for cproud21

I have a GUI app which in which I need to pass a value from an array to a List... here is what I have... The problem occurs when I try to pass the array element to the ActionListener... im not sure exactly how to do it... [ICODE] import java.awt.*; …

Member Avatar for LDeArm
0
159
Member Avatar for mabros86

hey guys!!! okay!!! i have a problems that this program is to build to choose a file and the copy it exactly to a new file of my choice but the only is that everytime i do that it happens to make a mistake it copies the file into the …

Member Avatar for mabros86
0
359
Member Avatar for cproud21

I have the following listing application that allows the user to make selections to build a skateboard. How can I add the values to the arrays which are declared? I do not understand how each value will be displayed when a particular option is selected. Also... I want to add …

0
95
Member Avatar for cproud21

I am getting the following error... init: deps-jar: compile-single: run-single: Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container at java.awt.Container.addImpl(Container.java:1010) at java.awt.Container.add(Container.java:928) at javax.swing.JFrame.addImpl(JFrame.java:480) at java.awt.Container.add(Container.java:899) at BoardCreator.<init>(BoardCreator.java:40) at Board.main(Board.java:14) Java Result: 1 BUILD SUCCESSFUL (total time: 3 seconds) Here is my code which is a box …

Member Avatar for quuba
0
116
Member Avatar for cproud21

I am to create a menu application for a cell phone company. The user is to select their package, phone, and any additional add ons they would like, and it is to disply the prices. This is by far the most advanced programming I have done to this point and …

Member Avatar for Ezzaral
0
276
Member Avatar for l_03

actually,,this is not my whole code..i just post the important one,,i am having problem with my code....i dont know how to figure out,,, everytime i am trying to withdraw and deposit..,,the balance will always be zero,, and i dont know how to figure it out.... [code] import javax.swing.*; public class …

Member Avatar for BestJewSinceJC
0
158
Member Avatar for LevelSix

"Write a program to display a linked list graphically. Draw each element of the list as a box, and indicate the links with line segments. Draw an iterator as in Figure 15-3. Supply buttons to move the iterator and to add and remove elements." The elements of the node appear …

Member Avatar for quuba
1
2K
Member Avatar for peter_budo

I working on assignment to create bank management GUI with swing. Right now I'm messing with login. Instead of using JDialog as many may suggest to use I used JFrame. [attach]8150[/attach] In case of any error messages on login attempt I wanted to display error above all previously displayed content, …

Member Avatar for peter_budo
0
143
Member Avatar for arunpawar

I'm trying to create simpel notebook for me to take down classnotes, using java swing & SQLite. This will even help me to learn more about swing & SQL . (I'm not sure whether it is possible or SQLites usage is good or not). So anyway i decided to use …

0
86
Member Avatar for VernonDozier

This is part of a larger project. I've simplified it here. I am implementing a word search program where word puzzles are produced and displayed. There are two main panels. One is the word search panel where there are rows of letters that spell words in different directions. The user …

Member Avatar for VernonDozier
0
5K
Member Avatar for VernonDozier

I have an applet that is not initializing: [code=JAVA] import javax.swing.*; public class WordSearchApplet extends JApplet { public WordSearchApplet (int width, int height) { } public void init () { new WordSearchApplet (700, 800); } } [/code] Here is the error I get. [quote] load: WordSearchApplet can't be instantiated. java.lang.InstantiationException: …

Member Avatar for VernonDozier
0
107
Member Avatar for cproud21

I wrote the code for the following 2 combo boxes which display a drop-down list of dorm buildings and meal plans for a college student. The code works, and both boxes are displayed. I have completed what I have to do, but want to find a way to get the …

Member Avatar for peter_budo
0
138
Member Avatar for cbickle

i am in a first semester programming class and this probably might seem like a dumb questino to everyone here but i have been working on this for along time and cant seem to come up with anything. i am stuck on 2 programs. the first is to ask for …

Member Avatar for cbickle
0
111
Member Avatar for cproud21

I created a combo box for the selection of a dorm.... I need to create another combo box for the selection of a meal plan... Should I write that in another class, or can I add it to this class? I need to display the total of the costs of …

Member Avatar for puneetkay
0
182

The End.