3,978 Topics

Member Avatar for
Member Avatar for VengefulToast

Will someone please tell me why I keep getting my custom file not found exception? The file is spelled correctly and is in the same directory of my java file. I am programming on Eclipse on Mac OS X. Here is my source: // Dillon Sheffield // Lab 10a // …

Member Avatar for VengefulToast
0
284
Member Avatar for blivori

I have a GUI in which has a container for a JTable called 'listTable'. I want to populate the JTable with data stored in a linked list, using the AbstractTableModel. Basically, I have a LinkedList stored in Processing.java. It contains all the data retrieved from a text file. I created …

Member Avatar for ejosiah
0
1K
Member Avatar for c.pentasuglia

Would anyone happen to know also if there is some predefined swing box for prompting the user to decided whether or not to overwrite an exhisting file? you know the basic "This file already exists, would you like to overwrite it?"

Member Avatar for c.pentasuglia
0
107
Member Avatar for prnjn

I have made a HRMS (Human Resource management System) using NetBeans 6.5 and for database MySQL 5 The project is completed and running fine ( great) without any problem when i run it in NetBeans using Run Main Project Button. Then i 'Clean and Build the project' and get a …

Member Avatar for NormR1
0
401
Member Avatar for DaAznSmurf

So my assignment is to design a simple GUI calculator using the stack data structure to perform additions, subtractions, multiplications and divisions. The calculator window should have at least two panels - one for display and the other for buttons (0 - 9, . , +, -, X, /, =, …

Member Avatar for NormR1
0
1K
Member Avatar for mehnihma

I need help with this code. I get zero values, how can I stop generating numbers when I hit the target number? Thanks import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.concurrent.locks.ReentrantLock; /** * @author Marin */ public class TargetFinder extends JFrame { private static final long serialVersionUID = …

Member Avatar for mehnihma
0
165
Member Avatar for dancingdophie

So the program is supposed to display the box like this (for LIST ALL TRANSACTIONS) : List all transactions: ID Type Amount 0 check 50.00 1 svr.chg 5.15 2 deposit 40.00 3 svr.chg 0.10 the box displays other transactions; it saves the old and new ones and display them one …

Member Avatar for dancingdophie
0
241
Member Avatar for Dmiller071

Hi all, I need to write an algorithm that can find intersections, dead-ends, and turns within a maze. Below is the code I currently have. You're welcome to read through it, though I'm not sure if it will help in any way. The basic information: - Maze image file is …

Member Avatar for Dmiller071
0
174
Member Avatar for setiawan.fenrir

hello there please help me, I have a problem with this program, i confused about how to make this program run well, this is the lish of program package guipert2; import java.awt.BorderLayout; import java.awt.Color; import java.util.ArrayList; import java.util.List; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JOptionPane; public class ContohList extends javax.swing.JFrame { …

Member Avatar for NormR1
0
171
Member Avatar for jarograv

I have used snippets of code from various sources to compile the following code: import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; import javax.swing.JFrame; import java.util.Calendar; public class ShowImage extends Panel { static Calendar cal = Calendar.getInstance(); //gets system time BufferedImage image; private static final String holidaysimages[] = { //declares …

Member Avatar for NormR1
0
297
Member Avatar for DreaIVI

Hi, I recently decided to have another go at learning some programming, and decided to make some sort of 2d gameboard useable for stuff like Chess and Othello. I ran into a problem that I ran into last time I tried learning programming as well, and it has to do …

Member Avatar for NormR1
0
204
Member Avatar for davebrown2242

Man, my *rookie* status os showing on this one... For the life of me, I cannot determine why my graphics panel section is not working to correctly display my Pie Chart.... I have the output broken down, and the variables exist... It runs looking for Annuities.csv in the C:\temp folder... …

Member Avatar for davebrown2242
0
258
Member Avatar for Dexxta27

I have a program that's supposed to interact with a databse but I keep getting a NullPOinterException. I know it means that something is set to null. But how to change them from null is my main problem import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; /* * To change …

Member Avatar for Dexxta27
0
124
Member Avatar for Saviour4You

Hello, I am a java learner and have just started learing java by follwing the online tutorials. I am a computer science student and as a part of our assisgnment, I have to design a online CHat system in java. TBH, I have no clue of what to learn and …

Member Avatar for NetJunkie
0
290
Member Avatar for Baduizm

Why do I get a Null Pointer in my test whenever I run it from the ant?My Test class Is: package com.MySelf.exchangerate.exchange; import static org.junit.Assert.assertEquals; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import junit.framework.Test; import com.MySelf.exchangerate.application.ExchangeRateApplication; import junit.framework.TestSuite; public class ExchangeRateApplicationTestCase extends AbstractTestCase{ public static final Logger logger=Logger.getLogger(ExchangeRateApplicationTestCase.class); private static final double delta …

Member Avatar for Baduizm
0
164
Member Avatar for mags11

Hello. I am having a slight problem with layout in my program. The Textfield doesn't seem to be aligned with the Message Label. The program is a GUI MPG calculator. It's supposed to calculate the car's mileage. It's supposed to let the user enter the number of gallons of gas …

Member Avatar for NormR1
0
740
Member Avatar for jackbauer24

When I run my bucky.java, the background color is black and not pink. Why? Here is my bucky.java:- import javax.swing.*; import java.awt.*; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 3/30/12 * Time: 3:59 PM * To change this template use File | Settings | File Templates. …

Member Avatar for jackbauer24
0
182
Member Avatar for samc36

# Java Conversion Program # Hi everyone reading this. I appreciate you taking the time to even look at my problem. I'm designing a converter app in Java to convert units, km to ms-1, degrees celsius to fahrenheit etc etc.. I have built a basic Gui using the WindowBuilder plugin …

Member Avatar for samc36
0
338
Member Avatar for loserspearl

Im working on applying a schema to an xml document but my editor (exchanger xml) is giving me some errors I can't figure out Ln 35 Col 67 - s4s-elt-invalid-content.1: The content of '#AnonType_inventory' is invalid. Element 'element' is invalid, misplaced, or occurs too often. Ln 16 Col 58 - …

0
132
Member Avatar for jarograv

import javax.swing.JOptionPane; public class Login{ public static void main(String[] args){ String username = JOptionPane.showInputDialog("What is the desired username?"); String password = JOptionPane.showInputDialog("What is the desired password?"); boolean unlock=false; while(unlock==false){ String usernameinput = JOptionPane.showInputDialog("What is the username?"); if(username==usernameinput){ String passwordinput = JOptionPane.showInputDialog("What is the password?"); if(passwordinput==password){ System.out.println("access granted"); unlock=true; }else{ System.out.println("denied"); …

Member Avatar for jarograv
0
120
Member Avatar for syed30

Hey guys I need to hand in this assingment and actually made an account for this as I know this is one of the best forums so far that I have came across about programing, so it would be awesome if someone could help me out with this. So first …

Member Avatar for Ezzaral
1
509
Member Avatar for jackbauer24

Hey guys, sorry I didn't post for long. Now here I am, with a new issue. Here is my code:- import java.applet.*; import java.awt.*; import javax.swing.JFrame; public class HelloWorld extends JFrame { public HelloWorld() { setVisible(true); setResizable(false); setSize(300, 300); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void paint (Graphics g) { g.drawString("Hello World!", 50, …

Member Avatar for JamesCherrill
0
301
Member Avatar for Majestics

at javax.swing.table.DefaultTableModel.setValueAt(Unknown Source) at javax.swing.JTable.setValueAt(Unknown Source) I am setting a table row manually.... its just for checking purpose , i have 10 rows and 10 columns but still i am getting this error, please help me to resolve it....

Member Avatar for Majestics
0
283
Member Avatar for Onlineshade

I have face some problem with java swing component.I need to show at least 200 data in a jtable.But here is the limitation in Jtable to show at most 100 data.How can I solve this problem?? I am using mySQL data base for handling data.So it is too difficult to …

Member Avatar for Onlineshade
0
214
Member Avatar for darkseeker

Hello everyone, I'm new to java and I'm working on a assignment, but I couldn't compile the BookTest.java. Here's my Book.java package question_1; public class Book { private String title; // Title of the book private String author; // Author of book : private String isbn; // International Standard Book …

Member Avatar for NormR1
0
127
Member Avatar for jshort89

I am a student and am pretty new with java. I'm trying to write a basic pacman applet for a class my problem is i have the code written to draw the maze and the pacman but when i run the applet all I am getting is the black background …

Member Avatar for NormR1
1
331
Member Avatar for tleverington1

Hi there, when calling a method from another class I get the following error message: ** Exception in thread "main" java.lang.NullPointerException at TextAnalyser.main(TextAnalyser.java:23) ** My two classes: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.String.*; import java.util.*; public class TextAnalyser { static Tokeniser aTokeniser; public TextAnalyser(Tokeniser aTokeniser) { } public …

Member Avatar for tleverington1
0
2K
Member Avatar for Thermalnuke

Hey guys I need help with in my code... I need to add a method that checks wheather the weather attributes are consistant or not. thanks for the help heres my code... import javax.swing.JOptionPane; public class Week_eight_number_31 { private int DefaultFarenheit = 70; private String DefaultSky = "Sunny"; public Week_eight_number_31 …

Member Avatar for NormR1
0
184
Member Avatar for DavidKroukamp

Hey all, I have been wanting to make a cool game in jave such as a fighting game starting off simple with drwing stick figures :). But i was wondering why there are so many java games created in Japplet why not use swing- i know there are games out …

Member Avatar for DavidKroukamp
0
193
Member Avatar for RinzLove

> Quoted Text Here Hi, anyone can help pass values of JRadioButton to another JFrame? For example, if "twoway" Jradiobutton is selected, its value (a char i.e. "2-way face foundation") will be shown in another JFrame. Thanks in advanced.. Code blocks are created by indenting at least 4 spaces ... …

Member Avatar for NormR1
0
263
Member Avatar for devninja

I have everything added to the JFrame using absolute positioning. It works fine but when it repaints the pie chart it also repaints the last JNumericField and button at the the very top left of the screen. At postion 0, 0 I presume PieChartFrame.java import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

Member Avatar for NormR1
0
189
Member Avatar for jarograv

I am working on a java application that will display an image and play a sound. It finds the current month and displays the appropriate information. Below is the code that I have been testing (that's why santa is in april) it will not work when trying to play wav …

0
253
Member Avatar for giri.pankaj

Is as way test out swing components without having to rely on Thread.sleep() to make sure that the components have realized completely. This problem with this approach is that it becomes difficult to guess how long it would take for components to realize under different environments of execution like vnc …

Member Avatar for peter_budo
0
285
Member Avatar for markjnj

Hey all, I'm working on a login screen and have an MSAccess database that stores the userName and password. I am currently using JtextField and String to access the username and password located in the MSAccess database, but now I want to hide the password when it is being typed …

Member Avatar for NewJavaLearner
0
583
Member Avatar for TheFlyingOwl

I am making a java gui keyboard as practice The keyboard itself works well and is made out of JButtons It changes colors when a certain key is pressed and then releseased I have two questions: Is there a simple way to listen for tab being pressed? Is there a …

Member Avatar for NormR1
0
303
Member Avatar for fatzky_04

Hello. I'm new to Java. I created 4 CHOICE that has 9 numbers. It should convert the selected item into words in the text area. I don't have any idea how to do it. Please Help. Here's my code. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class Final1 …

Member Avatar for fatzky_04
0
320
Member Avatar for Ralphael

I am cresting a digital clock and I am having troubles updating the interface please can someone help me with this. I have the code below: ********/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Interface; /** * * …

Member Avatar for NormR1
0
646
Member Avatar for devninja

I made a custom JTextField that only accepts numbers into the textfield. I used insertString to do this. Tt works pretty well except it allows oddly only the letter e. It accept e only after a number is inputted first. And once e has been entered the textfield does not …

Member Avatar for devninja
0
454
Member Avatar for tleverington1

Hi all, I have a slight problem when checking if a "Token" is in my StringTokenizer string. My code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.String.*; import java.util.*; public class TextAnalyser { public static void main( String args ) { StringTokenizer stringTokenizer = new StringTokenizer("You are tokenizing string"); System.out.println("The …

Member Avatar for NormR1
0
100
Member Avatar for zAxOanL

Hi. I have problem adding text box after each label ID Code, Weight, Rate, Price Charge, it does not show when i run the code. Also, how do i add the $ sign when display the price charge. the ouput should be like this: Fee Calculator ID Code: [Text Box] …

Member Avatar for stultuske
0
431
Member Avatar for wickedlullaby92

This was the assignment: Write a class with methods to help you balance your checking account(an object class-main method is not in this class). The CheckingAccount Class should have at least two instance variables: the balance and the total service charges, along with methods to get and set each instance …

Member Avatar for NormR1
0
236
Member Avatar for huskarit

In one class i have a back button(java Swing)...i want when i click this button it will go to another class and close the current class...however, when i use System.exit(0)...it closes both 2 class...if i use setVisible(false) for the current class...that class still running...how can i close the current and …

Member Avatar for DavidKroukamp
0
565
Member Avatar for shean1488

Hi everybody! I made an applet, and was trying to put it in web page. When I run my applet by itself it works fine, but when I'm trying to run it thrue the web page it doesn't work at all. I mean I have just grey box (like a …

Member Avatar for shean1488
0
99
Member Avatar for skiabox

I am trying to create an oval shape using Netbeans but the oval shape never draws itself. Here is the code : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package learn; import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; /** …

Member Avatar for NormR1
0
173
Member Avatar for jarograv

I have these 2 classes: [CODE]import javax.swing.JOptionPane; public class Theatre2D { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub // declares an array of integers int[][] myTheatre2D; // allocates memory for 2*10 integers myTheatre2D = new int[2][10]; myTheatre2D[0][0] = 20; myTheatre2D[0][1] = …

Member Avatar for jarograv
0
1K
Member Avatar for DavidKroukamp

Hey all, I have been busy building my own chess game and as of now im a bit stomped. Well you see i have an object Board, this object will be initiated and it will create a new frame with various panels one of them being the panel which holds …

Member Avatar for JamesCherrill
1
247
Member Avatar for jet101

guys, I need help in swing framework... what method is being used when you have to pressed exit button first before opening other frames? It's like an equivalent of showDialog() from C#.net.

Member Avatar for jet101
0
217
Member Avatar for FDRSOURCE

I receive error at camera.Camera.<init>(Camera.java:19) at camera.Camera.init(Camera.java:32) at camera.Camera.<init>(Camera.java:21) at camera.Camera.init(Camera.java:32) at camera.Camera.<init>(Camera.java:21) at camera.Camera.init(Camera.java:32) at camera.Camera.<init>(Camera.java:21) at camera.Camera.init(Camera.jav and continues. Please help, last day [CODE]package camera; import javax.swing.*; import java.awt.event.*; import java.awt.event.ActionListener; /** * * @author FDR */ public final class Camera extends JFrame{ private JTextArea txt; private Camera …

Member Avatar for JamesCherrill
0
182
Member Avatar for krejar

Given a UML diagram of: Oval ------- ------- +draw (g:Graphics, x:int, y:int) +toString(): String I have currently [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Oval extends Shape { public Oval (Color color, boolean isFilled, int width) { super (color, isFilled, width); } public void draw (Graphics g, int x, …

Member Avatar for JamesCherrill
0
122
Member Avatar for jade_91

so heres my code [CODE] import java.awt.*; import java.text.*; import java.util.*; import java.util.List; // Explicit import required import javax.swing.*; public class Sort { public static void main(String args[]) { Runnable runner = new Runnable() { public void run() { String words[] = {"Sean", "Beth", "Ryan", "Bree", "Jim", "Bob"}; List list …

Member Avatar for NormR1
0
263

The End.