32,204 Topics
| |
There's something wrong with this code. I must implement the TestScores class, but I know I am missing something. /** TestScores class */ import java.util.Scanner; // Needed for the Scanner class // For use in CodeMate, the TestScores class is not declared to be // public. Normally the class header … | |
Hi, I have recently embarked on an adventure into the programming world and am a 'newby' to java. Am trying to get 'my robot' to recgonise the difference between 'blue' and 'red', and execute commands - My program so far is the following - it's not recgonising the colour difference. … | |
hi everyone, i am trying to write a java program that assigns a specified number of true values to random elements in an array. for example if i have a boolean array of 10 elements i would like 5 of these elements to be randomly assigned true values. im new … | |
Hi guys? I have been programming in Java using J2SE. currently am working on J2EE enterprise application development using JavaServer Faces Technology.Since am new to JavaServer Faces have decided to start by a simple login applications.Developing the interface is not a big problem but getting the parameters from the inputText … | |
Hey guys I am stumped. My code worked fine until I added the calculations: [CODE]else{ interestRate = rate[choice]; termLoan = tYear[choice]; }[/CODE] :\Users\Mom\Desktop\DuttonWeek4.java:252: incompatible types found : double required: javax.swing.JTextField interestRate = rate[choice]; ^ C:\Users\Mom\Desktop\DuttonWeek4.java:253: incompatible types found : int required: javax.swing.JTextField termLoan = tYear[choice]; ^ 2 errors Tool completed … | |
I have tried to figure this out and am having major problems with math pow. Any help would be great... This project deals with reading input from the user, storing the input into variables and displaying those variables. This program is an introductory project into the basic data types of … | |
I'm trying to figure out how to transfer several methods in a cash register into one void method. Here is my code. /** * A cash register totals up sales and computes change due. */ public class CashRegister { private double purchase; private double payment; /** * Constructs a cash … | |
| import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; class NewUser //extends Variable implements ActionListener { JInternalFrame ifrm; JLabel lbleid,lblena,lbleadd,lbletp,lbleage,lbluse,lblpas,lblcat; JTextField txteid,txtuse,txtena,txteadd,txtetp,txteage,txtpas; JButton btnadd,btndelete,btnclear,btnsearch,btnupdate; JComboBox cmbcat ; public JInternalFrame display() { JInternalFrame ifrm=new JInternalFrame("User Process",true,true,false,false); // ifrm.getContentPane().setLayout(null); ifrm.setSize(600,600); ifrm.setLocation(0,0); ifrm.setResizable(false); ifrm.setDefaultCloseOperation(ifrm.DISPOSE_ON_CLOSE); ifrm.setVisible(true); JPanel p; p=new JPanel(); p.setLayout(null); //pic =new JLabel(new ImageIcon("Employee.jpg")); … |
I have a complex UI with little screen real estate, so I'm trying to allow users to manage contents of a combo box using a right-click context menu. But I'm having trouble getting the combo box's drop down list to appear at the same time as the pop-up menu. I've … | |
How to write a program to calculate incoming and outgoing packets at each system. what are the different files which are used to calculate Ip and Mac address? R there any files which are used to draw real tie graph? | |
Oracle Certified Professional Java Programmer was formerly known as the Sun Certified Java Programmer certification. Does anyone know if the switch to Oracle has changed anything significantly, such as the questions that will be on the test? Or is it the same cert with a new name? The reason I … | |
I am fresher in software engineering seeking job. But i want to know in which designation can i able to be placed. I am some what good in programming (java,c,c++). When i registered in any companies they ask me about job code. And also i am undergoing course in web … | |
Hey, I was thinking of trying to write my own custom swing component. I was thinking of a simple text based component that would act like an open book. Text would be displayed on the left side/page of the component until there is no space left and then the rest … | |
hello, I had a fckeditor at my php page, i want to put some data in fck editor when user click a button. How can i do that using javascript. Please help | |
I am trying to make an Inventory GUI application using MySQL and NetBeans. So far, i was able to do add,delete,search, and save using Java Desktop Application. I now have to add a SEARCH button, a notification for the quantity if it is less than 10 and a USERNAME and … | |
Can i create a Ms access database through java code? Can i place Ms access Database inside my project and can i manipulate them? | |
Hi all, I have written a basic program with 3 option using a switch statement, the 2nd option being a reverse string code using charAt() when you select option 2 and press enter it then switchs to case 2: which then asks for the string you wish to reverse, is … | |
Hey! I'm taking my first CS class and new to all this... i'm using eclipse. i need to prompt the user to enter their FULL name ie. John Smith. i cannot ask the user to enter their 1st and last name separately. i then have to print/display the name in … | |
i can trap Number only but i cant trap letter inputs. how to do that? please? example. Enter a letter: 5 "INVALID INPUT! PLEASE ENTER A NUMBER!" please guys?! | |
Hello, i want to know what's the use of new keyword while Initializaing the array in JAVA.How it's helping in java whether same like new in c++ or malloc in c | |
Hello my friends I have a txt file with the follow layout [QUOTE] error1 255 error2 34 error5 111 error3 23 [/QUOTE] and what i'm trying to achieve is, from this text file plot a trend chart with the errors and respective quantity! this is the code that i'm using.... … | |
I've been programming in Java using Java SE, but I want to move on to Java EE. Is this a good idea? I used to think I had to pay to download the Java EE SDK, but that's not the case. So, basically, I'm a bit confused about what Java … | |
[CODE] int a,b; double temp; int sortTheNumbers = sentenceList.size() - 1; for (a = 0; a < sortTheNumbers; ++a) { for (b = 0; b < sortTheNumbers; ++b) if(score[b] < score[b + 1]) { temp = score[b]; score[b] = score[b + 1]; score[b + 1] = temp; } } [/CODE] … | |
Hello, I'm trying to write a program for matrix multiplication I keep getting an error.... Please help [code] class Matrix { private int numRows, numColumns; private double x[][]; public Matrix(int m, int n){ numRows = m; numColumns = n; x = new double[numRows][numColumns]; for(int i = 0; i < numRows; … | |
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class MenuDemo extends JApplet { // Text fields for Number 1, Number 2, and Result private JTextField jtfNum1, jtfNum2, jtfResult; // Buttons "Add", "Subtract", "Multiply" and "Divide" private JButton jbtAdd, jbtSub, jbtMul, jbtDiv; // Menu items "Add", "Subtract", "Multiply", "Divide" and "Close" private … | |
hi..I am really new in Java software development..I am trying to make sure that the JXTable will refresh or update the data after the save button is clicked which means that the JXTable will display the lastest data that retrieved from the database..as what I had googled through the methods … | |
When I try to run what I have so far in my program, I get an error when I enter in the date as 11/11/2010 that states "Exception in thread "main" java.util.InputMismatchException". Why am I getting this and how do I fix it? Also, I have some comments in the … | |
I can't believe I'm asking this, but this assignment I was given is proving very difficult. I was asked to find the ECLOSE function of a given Epsilon non-deterministic finite automata. All it is is the BFS tree of a graph from a given point, provided that the vertices are … | |
So even though this is a simple project, I found a lack of good code on the web under this topic for multi lined strings. I thought I would share it with everyone. Hope it helps you! Prints file foward first, then in reverse (and yes there are many different … | |
Hello, I'm really new to doing Java only been doing it about 2 month so really a novice. I'm currently attempting to make my first app that is not a school project. I want to embed the current time in my application that is pulled from the local system. It … |
The End.