32,199 Topics

Member Avatar for
Member Avatar for ShaneJ33

I am missing something in my check sub class and I can't figure it out I know its something simple and I for the life of me can not find it. package lab61; public class AccountClass { public double annualInterestRate; public double balance; public int Id; public java.util.Date dateCreated= new …

Member Avatar for ShaneJ33
0
561
Member Avatar for ali11

everything is working fine except Encryption button. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; public class encryption extends JPanel implements ActionListener { char [] str= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' }; char [] str1={'1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(','_','_','+','=',',','.','?'}; char [] a= new char [50]; char [] b= new char …

Member Avatar for JamesCherrill
0
275
Member Avatar for Chalzer

How will I create a program that compute your final grade and file which contain prelim, midterm, pre final and final grade.Create another file that contain weight for each term.(prelim=20%, midterm=20%, prefinal=20% and final=40%)

Member Avatar for JamesCherrill
0
107
Member Avatar for Christel_1

i am getting this error when trying to run projects 'javac' is not recognized as an internal or external command, operable program or batch file how can i fix this

Member Avatar for Christel_1
0
78
Member Avatar for Zubenna

I am new to Java language. I have been taken some personal tutorials, reading on my own and practicing by writing and solving exercise in the book I am using. Below is an exercise I am trying to solve. Question. (Find the Smallest Value) Write an application that finds the …

Member Avatar for Zubenna
0
1K
Member Avatar for manalibhadula

Can anyone help me how to pick all the files(many files) of some particular extention(.csv) and transferring it to remote server using Jsch channel. Please help. Regards

Member Avatar for manalibhadula
0
4K
Member Avatar for priyanka_10

Hi, I just wanted to know about instance method? If static modifier is not applied before does it makes it an instance method ? Plz give an example Thanku

Member Avatar for stultuske
0
157
Member Avatar for Brandon_7

I am trying to make a program for my AP Computer Science A Class. I wrote the following code that is supposed to allow a user to enter two numbers and then have them guess a number inbetween that number range. So far, it works 90% of the time, but …

Member Avatar for Brandon_7
0
315
Member Avatar for RacerRed

Trying to change this C++ to Java //The following pseudocode describes how to extract the dollars and cents from a //price given as a floating - point value.For example, a price 2.95 yields values 2 and 95 //for the dollars and cents. //Assign the price to an integer variable dollars. …

Member Avatar for JamesCherrill
0
354
Member Avatar for CodeWarrior14

I need to get the size of a file, but I keep on getting 0 as the size, which is not the actual size. private void dodAlgorithm() throws IOException { int count; int randomValue; long fileSize; File file = new File(filename); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); SecureRandom random = …

Member Avatar for sepp2k
0
5K
Member Avatar for divinity02

hey all I have a program to write and I need to use the JOptionPane dialog box to use JOptionPane to say Yes_No_Option, all I would like to know what is the code to be used , how does it work and will it work in a program.

Member Avatar for divinity02
0
189
Member Avatar for Christel_1

hie, new to daniweb my name is christel my interests are user interface design, javascript, ajax, node.js & JSP. looking forward to putting a few java certifications under my belt this year here is my hellow world in java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, …

Member Avatar for Farouke
0
270
Member Avatar for Nation

I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including …

Member Avatar for mKorbel
0
1K
Member Avatar for Mr.M

Hi Dw I have a multi-threaded server that connects thousands of clients. The clients sends in data that the server must write to a text file. As there are a thousands of clients sending in data the server has about 60 texts files but the data sent by the client …

Member Avatar for JamesCherrill
0
11K
Member Avatar for rekhapalli

hi i need the answer of :- write any 3 java programs, but their is no java programs in the computer

Member Avatar for stultuske
-1
69
Member Avatar for SANJAY.N.MHATRE

Java swing component jtabbedpane is opaque even after jtabbedpane.setBackground(new Color(0,0,0,0)); or jtabbedpane.setBackgroundAt(index,new Color(0,0,0,0));

Member Avatar for JamesCherrill
0
34
Member Avatar for divinity02

trying for the longest while to get this program to run at least properly, havent finished entering all of the codes as, just testing each part of the statement before i add in the rest of the codes the program is not working properly dont know where I have gone …

Member Avatar for JamesCherrill
0
253
Member Avatar for Ant695

Every time I try to compile this code I get the same error but it doesnt seem to make any sense. This is the code: public class Software Development { public static void main(String[]args) { System.out.println("Hello World"); System.out.println("2name"); System.out.println("name: \n"+name); System.out.println("\"name:\""+name); } } And this is the error: Software Development.java:1: …

Member Avatar for stultuske
0
128
Member Avatar for Gl753

I am currently working on a program that asks a student to answer 5 simple maths questions after each question it will state whether the answer is right or not. which it will out put a grade and grade average percentage. Currently I'm stuck on the if statement where it …

Member Avatar for stultuske
0
205
Member Avatar for sejalp26

package deviation; import java.util.Scanner; public class Deviation { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter n: "); int n = input.nextInt(); System.out.println("Enter " + n + " numbers: "); double[] x = new double[n]; int i; for (i = 0; i<n; i++) { x[i] = …

Member Avatar for sejalp26
0
279
Member Avatar for Gl753

Sorry for the misleading question guys, I know how to generate two random numbers but I want to use them in One JOptionPane input Dialogbox so the user can add the two numbers. Below is my code of what I have done so far I know it's not a lot …

Member Avatar for Gl753
0
456
Member Avatar for divinity02

hi all i am doing a programing and got stuck on two condition. here is the code that I have done so far. it is as far as i reach. for(int i=1; i<=3; i++){ System.out.println("please enter the employee id number"); emp_idnum = input.nextInt(); System.out.println("please enter the employee first name"); empfirst_name …

Member Avatar for divinity02
0
298
Member Avatar for sciprog22

Hello, Thank you for your time! I am trying to understand the Quick Sort algorithm. I have some questions about the partition method. I found the following implementation online: import java.util.Scanner; public class QuickSorts { public static int partition(int a[], int left, int right, int size) { int pivot = …

Member Avatar for sciprog22
0
229
Member Avatar for Spyderbane

At my work we have an internal webite that only uses Java 6. 7 and up will crash the site locally. I am aware that it really needs to be update for many reason. Does any one know of a way to launch IE to use an older version of …

0
106
Member Avatar for Nation

I have a JTable that has four columns. In the second column I have assigned a JComboBox to be the cell editor of my column.The problem that I encountered is that I cannot handle the combobox the way I want. **What I want is that after a user select an …

Member Avatar for mKorbel
0
2K
Member Avatar for gretty

Hello I am new to Java & I am trying to find ways(in built Java objects/ways) to parse HTML. Can you suggest some objects in the Java Standard Library? I have extended the object HTMLEditorKit.ParserCallback but when parsing a web pages' source code it literally takes 2 minutes or more! …

Member Avatar for olupotd
0
198
Member Avatar for amogh.max

here is my code and i have tokenized the data in my .txt file.I want to insert them into a database. import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.StringTokenizer; public class test1 { public static void main(String[] args) { BufferedReader br = null; try { String sCurrentLine; br = new …

Member Avatar for JamesCherrill
0
294
Member Avatar for Sam_13

<html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import java.text.DecimalFormat; import java.util.Scanner; public class BookBillSystem { public static void main(String[] args) { //create the Scanner instance for taking input from console Scanner scanner = new Scanner(System.in); //take input customer name System.out.print("Customer Name: "); String customerName = scanner.nextLine(); //take input noOfBooks purchased System.out.print("No of books …

Member Avatar for stultuske
0
198
Member Avatar for Orichaicum

When I try to type in a set user to add to the friends list, it shows up blank via [[]]. I know I'm missing something or it's the way I set up the input, but I can't figure it out. Main Driver import java.util.*; public class main { public …

Member Avatar for Orichaicum
0
1K
Member Avatar for shahera.arafat

I want to ask >>what is the use of (string args[])??? and how can I use system.exit >>without intially import the package (java.lang) ? thanks ^^ import javax.swing.JoptionPane; public welcome1 { public static void main (stirng args[]){ JoptionPane.showMessageDialoge(null,"welcome to java"); system.exit(0); } }

Member Avatar for JamesCherrill
0
128

The End.