3,978 Topics
![]() | |
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 … | |
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 … | |
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 = … | |
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, … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
[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 … | |
HI Folks , Any one Here Name The Java Swing Component with "Date and Time Instance"? Thankq Sekhar | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.*; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.*; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
"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 … | |
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, … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … |
The End.