31,001 Topics

Member Avatar for
Member Avatar for sasikrishnasamy

Hi I have double values like this, double value1 = 100.0 double value2 = 100.23 I need to convert like this, value1 = 100 value2 = 100.23 Kindly give some sugesstions to convert like this.

Member Avatar for stultuske
0
183
Member Avatar for reincom

import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PaymentCalculator extends JFrame{ private JPanel panelTitle,panelInput,panelButtons; private JLabel lbltuition, lblmisc, lblscholarship, lblfee; private JTextField txttuition, txtmisc; private JComboBox cbscholarship; private JRadioButton optfull, opttuition,optOther; private ButtonGroup btnpayment; private JCheckBox chkfees1, chkfees2, chkfees3; private JButton btncompute, btnclear; private JList listbuy; private DefaultListModel listmodel; private …

Member Avatar for reincom
0
142
Member Avatar for piyush_2

hiii.! how to make a hollow square of asterisks by entering a size of side by user, for example if 4 is entered then, it will be print, * * * * * * * * * * * * of 4*4.

Member Avatar for JamesCherrill
0
205
Member Avatar for android_gl

http://pastebin.com/v4Jd1yTc hi I am following a tutorial which shows how to create tileMap game in java. But i cant seem to understand some of the methods and variables. main code i post it on pastebin.com take a look. problem is I cant seem to understand what is method calculateCorners is …

Member Avatar for JamesCherrill
0
122
Member Avatar for AbanJ
Member Avatar for shashidhargm
Member Avatar for dnanassy

Hi folks! I need some homework help. I have the following requirements: // Strings required for Homework. String[]strVector = {"octhkeugrk", "fedjigchba", "mnpqdetjhz", "bgxlvfcdaz"}; a) Write code that transforms the string array provided above into a 2 dimensional character matrix, (e.g., char[][] charMatrix;). b) Once in the two dimensional array form, …

Member Avatar for somjit{}
0
781
Member Avatar for Manny01

As an assignment, I was asked to build a java program which can inspect the content of a website, display and download a particular form of media on that web page or the whole web page (depending on the user's need) for offline viewing. I understand I need three components: …

Member Avatar for JamesCherrill
0
112
Member Avatar for nitin1

Actually, I am working on project and specifications are : * using windows 7 ultimate * using Java language to develop project * using IntelliJ IDE for project now, When i run my project it give me output in the section at the bottom in the IDE itself. But, i …

Member Avatar for JamesCherrill
0
236
Member Avatar for jtresue

I made this program but it isn't working; any suggestions? /* * Program Name : GuessGame.java * Author : James Resue * Date : October 6, 2010 * Purpose: Write a program GuessGame.java that plays the game “guess the number” as follows: * Your program chooses the number to be …

Member Avatar for JamesCherrill
0
3K
Member Avatar for wallet123

Hey guys! I want to use jtable to encode a grade, this is where i will enter the grade of the student. and when i click the submit button, the data should be in a variable where i can manipulate it and solve for the average. It will look like …

Member Avatar for stultuske
0
195
Member Avatar for ferfer

I am tring to implement a website search engine with java as an applet,I have used nutch as web crawler and cassandra as my database,I have to use a nosql database(because my teacher wants me to do),now my question is what should I do next to complete my search engine? …

0
54
Member Avatar for Pyler

Hi I'm trying to write a toString() method for a generic LinkedStack but I'm having trouble My class has two push methods. One pushes elements of some type onto the stack. It takes in some generic element and pushes it onto the stack. The other method takes in some generic …

Member Avatar for Pyler
0
1K
Member Avatar for newbie14

I have been taking few different heap snapshots. What I see is that the memory usage is not the same as reported by this codes. So how to know the exact memory is being used by my java application. I also see my leak report from MAT reports a lot …

Member Avatar for newbie14
0
287
Member Avatar for Conquero

How do you find the dot product of 2 matrixes with: matrix 1 has arbitrary rows and arbitrary columns- user will input rows and columns, same for matrix 2 (to multiply, rows of matrix 1 must be the columns size of matrix 2 and column size of matrix1 must be …

Member Avatar for stevelg
0
122
Member Avatar for Malaka_1

1. There are some error in lion no 15 .can anyone help me to fix this??? 1. import java.util.Scanner; 2. 3. public class intArray 4. { 5. 6. public static void main (String [] args) 7. { 8. final int size =10; 9. int [] array = new int [size]; …

Member Avatar for Malaka_1
0
165
Member Avatar for Decode098

package pkg1; import java.awt.*; import javax.swing.*; public class Main { public static void main(String[] args) { JFrame frm = new JFrame("Title"); JTextField txt = new JTextField(); JLabel lbl = new JLabel("To"); JTextField txt2 = new JTextField(); frm.setLayout(new GridLayout(2,2,5,5)); frm.add(txt); frm.add(lbl); frm.add(txt2); frm.setSize(500,100); frm.setVisible(true); frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frm.setLocationRelativeTo(null); } } Someone please explaine …

Member Avatar for stultuske
0
93
Member Avatar for bibibengo

Hi, I'm looking for help to achieve my projet. It's about an application that can be able to send sms to the users mobiles phone and receive sms from them. The project is the developpement of an application which can permit farmers organisation and products buyers to communicate by sms …

Member Avatar for JamesCherrill
0
268
Member Avatar for triple.ph

write a java program that will ask the user to enter his/her name initial - first and last name, and then output a greeting that says "Hello", followed by the user's initial and an exclamation mark..

Member Avatar for masijade
0
113
Member Avatar for kartik.patel.3348

Cant find this error and all these java scripts are talking together can someone please find it. error has been noted blow. import javax.swing.JFrame; public class WindowApp{ public static void main(String [] args){ JFrame window = new JFrame("A window");//cans et the title on the title bar window.getContentPane().add(new ImagePanel()); window.setVisible(true); window.pack(); …

Member Avatar for stultuske
0
323
Member Avatar for cobalt555

For some reason I am receiving this error , cannot find symbol, method Math random() not found . If anyone knows why it would be of great help. int digit1 = (int)(Math.random() * 10); int digit2 =(int)(Math.random()* 10); this is supposed to give me two separate random digit variables between …

Member Avatar for cobalt555
0
123
Member Avatar for Seswing142

The program is supposed to ask the user for the range of the guesing game (1-10), ask them how many guesses they want, and then ask them for a guess. Then it prints out Cold if he guess is greater than 25% of the answer, print WARM if its between …

Member Avatar for JamesCherrill
1
3K
Member Avatar for Lloyd_2

Im kinda still new at java and with help, developed a java file that will take numbers from a text file and calculate a invoice that will format like this: Invoice -------------------------- Account Amount Due 10011 $12.25 10033 $11.70 -------------------------- Total $23.95 I got it to print out to console …

Member Avatar for stultuske
0
853
Member Avatar for qew.brown

Hi, This is my first post, forgive me for not being immediately familiar with any forum protocols. I am trying to read in a txt file and store the data in my class. I keep running into this error Exception in thread "main" java.lang.NumberFormatException: For input string: "./src.Chance" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) …

Member Avatar for qew.brown
0
257
Member Avatar for Anima Templi

Hello Daniweb, I will soon reach the point where I'm ready to move on my journey of programming. One thing that has always interested me is the mobile world. I would like to develop things for the mobile world. What I want to ask/know is tips from people already developing …

Member Avatar for Andy Res
0
311
Member Avatar for Thermalnuke

Hey Guys Im working on an assignment dealing with arrays. I have to Delete the duplicates in the array and re-display the array with the duplicates deleted. I Have code that I written up that is able to step throgh the process and will display the duplicated elements in the …

Member Avatar for JamesCherrill
0
472
Member Avatar for nitin1

I am doing a course in recommender systems on coursera.org. I have got an assignment in that. They have told us to use IntelliJ IDE and Lenskit to use. I am very good at C, C++, but not that well in Java. So finding it difficiult to get up these …

Member Avatar for pritaeas
0
117
Member Avatar for sujskiez

For some reason my java program can't find my textfile if i use file.next to display contents of the file but if use file.readLine it finds and shows the contencts of the filebut not the way i want for example: I want actual output like this: 1: Humps Black Eyed …

Member Avatar for stultuske
0
353
Member Avatar for ganges

Hi, I am using eclipse j2ee juno eclipse market place is not working this is the error i am getting "Unexpected exception java.lang.reflect.InvocationTargetException" give me solution to fix it. thanks for your time.

Member Avatar for stultuske
0
489
Member Avatar for subhraakasuny

Hi All, I want a make a system logger in java to track all the activity that is going on my system. Like 1)User Login 2)File Copy 3)Other Activities But,Being a beginner I don't have much knoweldge regarding my goal. Please provide your valuable feedback.

Member Avatar for stultuske
0
130

The End.