3,978 Topics
![]() | |
Dear all, I'm sorry to ask you again. This code is my jTable that I copy from my Netbeans source code. tblGroupAnggaran.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null}, {null, null} }, new String [] { "Kode group", "Nama group" } ) { Class[] types = new Class [] { … | |
Hi all, I use the swing timer to move a dialog from one position to another. Here is the code I have use. [CODE="java"] // Set the main window display location public void setWindowLocation() { int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height; int screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width; int frameHeight = this.getHeight(); int frameWidth = … | |
Everything works, except my WritetoDisk, it gives me a NullPointerException PLEASE HELP! /* * database.java * * Created on March 28, 2008 by Karlee * * This program allows the user to add/remove students' first & last name, social security number, debt, and GPA * The user can change te … | |
Dear all, I'm newbie in Java language. I get assingment from my teacher to create small project for my final test. Now, I create a Budget Controlling project using Netbeans. I have created main class, Login form, menu and MasterBudgetingGroup (addGroupAnggaran). In menu, I have menuItem. But when I click … | |
I currently have a program using keyboard input from the user, but am trying to replace keyboard input with onscreen buttons. Does anyone have any information on the best way to do this? I've pasted the code file involved with this (there are other files in the program). I'm not … | |
I am new in Java. I have to write a program that accept a person weight and display the number of Calories the person need in one day. A person needs 19 calories per pound of body weight, so the formula expressed in java is calories= bodyweight*19. Use JOptionPane claas … | |
Please i need help with My Login prog that can enable two categories of people to login that is the administrator and a user below is my code snipet bcos i am stucked. import java.util.* ; import java.awt.* ; import java.awt.event.* ; import javax.swing.*; public class HeartLandLogin extends JPanel implements … | |
Hey guys, I'm not sure if you can tell how long I've been registered by my status or something but I'm new obviously and having a little problem with an program I'm writing. I get an error message stating that "The constructor bankofMark.mattsAccount(String, String, String, String, String, String, String, String, … | |
i am trying to display the output in jlabels for this shipping cost program i have coded. I have created individual jlabels for the package ID, weight, and shipping cost and tried to display them with the mainPanel. I had no problems making labels for the input in my designFrame … | |
guys, i have been trying to do this for 4 days straight... i'm not getting anywhere... i really need ur help. i can do the formulas and the action listener and all that, but the only thing that i seem to be having a problem is with the layout of … | |
This is the first time I have ever had to do a simulation type program. This is what I'm trying to do: Your application should use an array of tellers (10 tellers would be a good maximum) but on any particular run of the simulation, any number of tellers from … | |
Hello, I have a problem setting a default button with Java Swing. I have a JFrame containing one JPanel and one JMenuBar. This panel contains some textfields, a list and some buttons. At the button there is one button which has to be the default button. I also gave the … | |
I have never posted anything in here for java so if I don'tuse the code tags right I apologize...anyways I compiled an assignment in text pad and have a ton or errors and I was wanting to know if it is something minor or I am really that stupid...thanks Here … ![]() | |
Hi there! I'm new to Java and just arrived at this forum. I hope I can get some help here - getting a little desperate. Well, I have to develop a small game in Java and in this game the user must be able to click on different spots on … | |
Hai, Iam using swing application for my project, i want to restrict by pressing windows key ant alt+tab key press , how to restrict?please help me.. | |
Hi, Here I developed Instant Messenger Program. but in ClientTests.java is giving some runtime error. can anybody help me plz. Here I am listing all my four programs. 1. Server.java [code=java]package com.app; import java.io.EOFException; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; … | |
I'm trying to put all the buttons (and their icons) into a single class. However, when I try to draw just one button in a frame, it doesn't show up. I can get it to be displayed if I instantiate the button in the same class as the Frame, but … | |
I can't get this to compile. It is for a homework assignment. The program asks user for 5 test scores and is to display letter grade and average test score. I was able to get the calcAverage method to work, but after adding the determineGrade method, I end up with … | |
Hi all, I am fairly new to java, as well as netbeans, but I come from a VB background. I am wanting to build platform independant aps and find the need to cross over into this world of Java, and netbeans (so far) is the best visual ide I have … | |
Hello I'm creating a program where I want a "BeanBox" window for editing an object's properties. I'm thinking something like: [url=http://img301.imageshack.us/img301/5308/javagridtg0.jpg][http://img301.imageshack.us/img301/5308/javagridtg0.jpg][/url] It must retain alot of the functionality that JTable gives: Resizable columns, custom cellrenders & celleditors, min/max column width. So far, so good. I could just use a JTable … | |
The question is "Where am I going wrong?" See my embedded comments above code starting point. I can get this to compile, but I can't get this loop through the amort, before I beign building (finishing the loop) I need to see if I can display a single line with … | |
Hi , For the following code , I intended to have a dialog box with labels balance , payment no : and a button named calculation. When the button will be clicked it should show the next balance according to the equation used in the code . But its showing … | |
I really need help. I have this whole program and am getting on error. | |
ok, im trying to use the set text method and the code im using it on looks as follows; [CODE]/** Convert the stringbuilder into an actual string, then return it */ String completeMatchList = matchList.toString(); String [] splitresult; String name = matchList.toString(); splitresult= name.split("\\s"); //txtbgreenentry.setText(splitresult[0]); //txtbyellowentry.setText(splitresult[0]); /** System.out.println(splitresult[5]); - this … | |
I'm having a really anoying problem with my picture display for a kids game. In the code supplyed i've only given the PicPanel where the picture function is placed. ButtonHandler where the listener is for the answeering of the questions & NumberGame main class that imports the previously defined panels … | |
#1, Im tryin to get this bb code right, #2 I need help with finding the problem with me code, it is saying that my for loop is a illegal start type and also a identifer is needed, but I have no clue, this is my first time doing object … | |
I have just finished a java code and I am having trouble with displaying each division increase or decrease from previous quarter and also a company increase or decrease from the previous quarter. Can someone help import javax.swing.JOptionPane; import javax.swing.JTextArea; import java.text.DecimalFormat; public class twoarray { /** * @param args … | |
my problem is that i dont know how will i start, i have the idea but i cant apply it.,.,. can you help me to put the cation listener?? this is a case study i am a i.t student in the philippines. and my project is a student grades.. the … | |
Hey Seem to be having a problem updating a JLabel updateScore() and don't seem to know why. this is effecting my keeping score. I know it something small but for life of me can't figure it out. Other JLabels have been up dated (see attachment for full programe) [code=java] import … | |
Hello. This is my first time programming in any language so please excuse my ignorance. I am trying write a program that asks the user to enter any number 3 times . I have assigned a function that takes the number and outputs an answer . After the 3rd number … | |
Hi everyone, I'm having trouble with this code. It compiles fine, but clicking the menu item I just added the actionlistener to doesn't work. I'm new to java and I can't figure it out. [CODE]/* * NewJFrame.java * * Created on March 10, 2008, 2:47 PM */ package javaapplication5; import … | |
I am running program through JGrasp and it compiles but the run stalls would someone mind telling me what is wrong? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; import java.util.Random; public class PennyPitch { public static void main(String[] args) { int score = 0; int played … | |
ive created a program using the actionperformedmethod...even though the panel and all other things r coming in the output nothing is happening when i perform an action.... here is the program...... [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.Color.*; public class goku extends JFrame implements ActionListener { int clicked=0; … | |
this is a program that the user is suppose to select a computation from a menu, the menu calls the function. and then the output is displayed in a nice java window. I think most of the coding is correct but i am having problems with the switch statement at … | |
I have a Dell Dimension 4500, About a year ago I decided to open the hinged case to clean some of the dust out. After she was all cleaned out I went to start her up. Well, she would start, but would not boot into windows. Just a yellow light … | |
If anyone has a minute, I could use some help. Been working on this program all day. I know it's hard trying to understand someone's code and logic...but I'm hoping there is an easy solution here. My program needs to be able to read and write files at the push … | |
I really don't understand what I'm doing wrong. I've made windows before..and never have had this problem. The code complies fine, but when I run it I get this message.. java.lang.NoClassDefFoundError: smartMonster Exception in thread "main" right now all I want is a window to pop up with a button. … | |
Hey, I'm new here (as you can tell), and I'm in need of some help.. I need to make a interest calculator that displays the years, beginning amount of each year, the interest of each year, and the end amount of each year. I have the GUI all set up … | |
We are supposed to make a frame eventually that shows different buttons corresponding to methods, allowing for someone to switch, add, remove, find (using object name find number in array), and get(use number position in array to find other pieces of data), and readData, allowing someone to read data from … | |
Hi i have written following java application in java and now i wnt to convert it into java applet,so an anybody help me out,plz.thanx in advance. import java.awt.*; import java.io.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.text.*; import javax.swing.event.*; import javax.swing.undo.*; import javax.swing.text.*; import javax.swing.KeyStroke.*; public class mynote extends … | |
Hello EveryOne I need Help here ,i have been trying to view this GUI but it keeps showing me this erroe `NoClassDefFounderError`. Anyones help would be appreciated. import java.awt.*; import java.awt.event.*; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import javax.swing.*; public class HeartLandHomeFinance2 extends JFrame { JPanel Panel; JLabel … | |
Hello Could anyone help us , we have a minesweeper's game code in java the game is good but has two problem the first one is when you press a mine button the game should be over and you can not press on any other button but our code allow … | |
Hi everybody, my problem is as follow, I have two classes myClass and myGUI myClass code is [CODE] public class MyClass { public void start() { while (true) { // do some stuff } } public void stop() { System.out.println("Hello from stop method!"); } } [/CODE] myGUI code is [CODE] … | |
Well, I was trying to add a simple applet to a web page(php nuke Home section), it didn't fin my applet, so I changed it and added it to a simple html file to make it as simple as I could get it. This is the code in the html … | |
i have tried every thing to get image on my button, i have looked all over the internet but i can't get a image to display, if any one can please help me. [CODE]import static javax.swing.JOptionPane.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.DecimalFormat; //Don's carpark2.java was used in making … | |
Here's my code: [code]import java.awt.FlowLayout; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JOptionPane; public class DisplayGUI extends JFrame { public static void main(String args[]) throws Exception { ButtonFrame buttonFrame = new ButtonFrame(); buttonFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); buttonFrame.setSize(275, 75); buttonFrame.setVisible(true); } private JButton Fibonacci; private JButton Factorial; public … | |
Could someone please look over this code and make sure there are no errors in it? I've looked through it again and again and I can't see what's wrong. However when I run the program (a Rock Paper scissors game) it seems that the second constructor isn't called correctly or … | |
package monitoring; import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.lang.*; import javax.swing.JEditorPane; import monitoring.task.jvm.JVMMonitoringTask; public class home extends JFrame { private JFrame j1; private JPanel c1; private JLabel m1; private JLabel l1; private JLabel l2; private JSeparator js1; private JButton j; private JButton s; private JButton tc; public home() { … | |
hey all, the noob is back. and with more questions that you guys will probably make fun of me for but...whatever. I am creating a GUI design where there are four labels (it doesn't need functionality) with an OK, HELP and CANCEL button on the right side. i haven't started … | |
I have recently been trying to work with OpenGL in Java and decided to go with JOGL to start. I am using SWT for my visuals and I am programming inside the Eclipse IDE. I have found plenty of interesting uses for OpenGL, but once I have more than one … |
The End.