31,001 Topics

Member Avatar for
Member Avatar for bunifrog

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 …

Member Avatar for NormR1
0
159
Member Avatar for Chalandria

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 …

Member Avatar for coil
0
209
Member Avatar for RockOwnedYou

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 …

Member Avatar for coil
0
243
Member Avatar for YATHAVANATH

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")); …

Member Avatar for adams161
0
98
Member Avatar for kramerd

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 …

0
92
Member Avatar for pinky.shet

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?

-1
60
Member Avatar for BestJewSinceJC

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 …

Member Avatar for prashantpatel
1
139
Member Avatar for vinotional

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 …

Member Avatar for vaibhav1983
0
190
Member Avatar for bops

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 …

Member Avatar for masijade
0
154
Member Avatar for caierhui

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 …

Member Avatar for stultuske
0
2K
Member Avatar for 47pirates

Can i create a Ms access database through java code? Can i place Ms access Database inside my project and can i manipulate them?

Member Avatar for stultuske
0
127
Member Avatar for hooky75

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 …

Member Avatar for stultuske
0
2K
Member Avatar for chichi44

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 …

Member Avatar for stultuske
0
83
Member Avatar for alleybye

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?!

Member Avatar for stultuske
0
91
Member Avatar for vasunttfshimoga

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

Member Avatar for stultuske
0
278
Member Avatar for jorgeflorencio

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.... …

Member Avatar for stultuske
0
2K
Member Avatar for glenak

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 …

Member Avatar for Dean_Grobler
0
146
Member Avatar for keanoppy

[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] …

Member Avatar for keanoppy
0
256
Member Avatar for JoonYup

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; …

Member Avatar for masijade
0
104
Member Avatar for badae

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 …

Member Avatar for badae
0
190
Member Avatar for star_lavender

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 …

Member Avatar for Ezzaral
0
245
Member Avatar for lilsmurf

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 …

Member Avatar for NormR1
0
742
Member Avatar for TGeorge824

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 …

Member Avatar for TGeorge824
0
146
Member Avatar for jamesonh20

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 …

Member Avatar for jasimp
0
174
Member Avatar for dragonshadow001

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 …

Member Avatar for Ezzaral
0
229
Member Avatar for pgset

i need to make a tree canopy in the shape of a pyramid drawn using nested loops the tree should look like this [url]http://cs.nmu.edu/~rappleto/Classes/CS120/Assignments/beach-assignment.html[/url] i have the trunk but i cant figure out the tree top to save my life. any ideas on where to start? thank you to all …

Member Avatar for NormR1
0
32
Member Avatar for shandow

Hi, I'm trying to make my own sokoban game in java. Sokoban is a top down 2D puzzle game where you move around a level trying to push boxes to the goal area in the least possible moves. I'm already pretty stuck at an early stage. My first objective it …

Member Avatar for adams161
0
414
Member Avatar for pgset

i just need a method that will draw me a flower but it says illegal start of expression error on line 36. what does that mean and how do i fix it? import java.applet.Applet; import java.awt.*; public class ProjectTwo extends Applet { public void paint(Graphics g) { ///background g.setColor(Color.blue); g.fillRect(0,0,1366,384); …

Member Avatar for adams161
0
148
Member Avatar for justsimplenick

I'm just starting out in java, and I am totally stumped on this assignment. I have to make a program where the user selects a single character and then a file. The program is then supposed to check each character in the file, and output how many times that character …

Member Avatar for NormR1
0
88
Member Avatar for alleybye

i cant sort it descending? why? please help me!! [code] import java.io.*; import java.util.Arrays; import java.util.Collections; public class alpha { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); int num = 0,c,x,a = 0,d,e,letter1,f; String input; System.out.println("\t[WELCOME]"); for (d = 0;d<=2;d++) { System.out.print("How …

Member Avatar for adams161
0
62

The End.