31,001 Topics

Member Avatar for
Member Avatar for Cris_1

what im gonna do if two Jtexfield numbers in the calculator? how can i command all buttons numbers put to second textfield?:) -java

Member Avatar for JamesCherrill
0
161
Member Avatar for pwolf

recently started learning java, going through the official tutorial and would like to check that the below code is a valid and correct solution to the following exercise ( [exercise 1](http://docs.oracle.com/javase/tutorial/java/javaOO/QandE/creating-questions.html) class Card{ // fields ------------------------------------------------------------------------------------------------------------- private static final String[] SUITS = {"Hearts", "Diamonds", "Spades", "Clubs"}; private static final String[] …

Member Avatar for pwolf
0
343
Member Avatar for Ghost

Hi Everybody, I was wondering if there was a way to find the most common letter/number/special symbol in a string. Thanks!! Thanks again in advanced, C++

Member Avatar for JamesCherrill
0
3K
Member Avatar for narlapavan

I am having two controllers. one is LoginScreenController.java and other is HomeScreenController.java. in loginscreencontroller, i am having button when clicked on that buton it will open homescreen controller. In HomeScreenController i am having TextField and a Ok button.I will fill some data in TextField and click on Ok Button. Here …

Member Avatar for SynThiicQ
0
834
Member Avatar for 1bung100

I've created a JButton and a Jtextfield in java swing. I want the button to perform the same function as BackSpace key of the keyboard. Is there any means to assign the properties of the the BckSpace key to the button, i.e. inheriting the properties of the key.

Member Avatar for Kubu Letuka
0
2K
Member Avatar for Narayanan.Sagit

Hello, I am facing an issue in struts 1.2 This code is in my JSP file. I am using multi select option. Initially the values will be populated to the multi select box from database through LabelValueBean. While I select one or more options and click submit, the values are …

Member Avatar for Narayanan.Sagit
0
175
Member Avatar for pekemp23

We just need the save button to save to a sql database. This is done other than that. it is saying, "Error: No suitable driver found for jdbc:derby:charityDB;create=true" import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; // Event listener import java.text.NumberFormat; import javax.swing.*; // GUI building import java.io.*; import java.sql.*; // JDSB …

Member Avatar for jwenting
0
348
Member Avatar for syasya

Question :create a n application containing an array that stores 20 proces such as RM2.34, RM7.89 and so on. The application should display the sum of all the prices , display all values less than 5.00 , calculate average price and display all values higher than calculated average. Requirement : …

Member Avatar for Alberto Bucur
-1
151
Member Avatar for narlapavan

Hi, I am having Two controllers One is LoginScreen and other is HomeScreen. In Login Screen i am having one TextField(txtData is variable name) ane one button (btnOk is var name). On clicking ok button it will open HomeScreen. In HomeScreen i am having One TextField(txtFill is var name) and …

0
163
Member Avatar for syasya

Hi , I am totally new to Java . I need someone to provide this question with code answer so that I can learn from your code . Thank you. Question 1 : Store 20 integer employee ID numbers in an integer array and 20 corresponding employee last names in …

Member Avatar for rubberman
-2
233
Member Avatar for firepower

please someone tell me how to change the size of the button.the code: JButton button1 = new JButton(); JButton button1 = new JButton(); public Mainmenu() { setLayout(new FlowLayout(100,278,158)); Icon button2= new ImageIcon(getClass().getResource("button1.jpg")); button2=new JButton(button2); add(button); Icon button2= new ImageIcon(getClass().getResource("button2.jpg")); button2=new JButton(button2); add(button2); HandlerC hand = new HandlerC(); button1.addActionListener(hand); button2.addActionListener(hand); } …

Member Avatar for JamesCherrill
0
259
Member Avatar for asaidi

Hi i m new in java i want to create one to many objects it depends of the user how many objects he wants to create for a test the user can put a name and age then these entries will be saved to a hasmap then to a file …

Member Avatar for SynThiicQ
0
224
Member Avatar for sciprog22

Hello, I have two programs: a) Server.java : Using a JFileChooser, selects a file and then sends it to Client. b) Client. java: Displays the file. My problem: I am able to send a file from server to client only once. The ObjectOutputStream.writeObject() does not work after that. I later …

Member Avatar for sciprog22
0
423
Member Avatar for Xabush

I'm working on a project on my own and wanted to create an JComponent or JFrame that looks like the following screenshot. ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-right") Here is its layout. ![e687f5cd32e6536ff8d0e3406b83b9e2](/attachments/small/4/e687f5cd32e6536ff8d0e3406b83b9e2.png "align-left") ![e687f5cd32e6536ff8d0e3406b83b9e2](/attachments/small/4/e687f5cd32e6536ff8d0e3406b83b9e2.png "align-left") I would appreciate it if you showed me by an …

Member Avatar for mKorbel
0
286
Member Avatar for r.nair3456

I have done most of the topics in core java.But i feel for web development u have to do advanced java.Then struts then hibernate.I have heard that c# is almost same as core java(j2se)so shall i proceed with .net because i have heard its not that lengthy and u have …

Member Avatar for jwenting
0
220
Member Avatar for oooooo1

private static Scanner scanner; import java.util.Scanner; public class Dfs { public static void dfs(int a[][],int m[],int i,int n) { int j; m[i]=1; for ( j = 0; j < n && i<n ; j++ ) { if ( a[i][j] == 1 && m[j]==0) { dfs(a,m,j,n); } } } public static …

Member Avatar for oooooo1
0
131
Member Avatar for asaidi

HI please can you run the code as attachement..i m trying to test the guess number ..if it is greater than the random number or smaller but when it is equal the function will return -1 i have error that i cannot understand as i m new in java the …

Member Avatar for JamesCherrill
0
244
Member Avatar for Hunter2379

So my server sends information and receives information. I know this because i tested it on the local host. The problem is that the portion it receives comes out with little squares after the user input. Here is a picture of the problem. [url]http://img706.imageshack.us/img706/3342/outputc.jpg[/url] [url]http://yfrog.com/jmoutputcj[/url] Thank You Server Code: [code]import …

Member Avatar for ROurOu
0
657
Member Avatar for mitul1719

For inputs A and B (integers) find number of possible integers X such that S(x^2)=S(X)^2 where S(x) is the sum of digits of X.......A<X<B

Member Avatar for jayshri.shah.10_1
0
107
Member Avatar for Xabush

I'm trying to create a JTextPane that has the following properties: 1. Vowel letters are colored in green 2. Consonants are colored in blue 3. Numbers are colored in red 4. And the maximum number of characters is 26 and all characters are in Upper Case To achieve this I …

Member Avatar for Xabush
0
345
Member Avatar for anku83

I have a text file transa.txt .I want the contents of the file to be filled in the array cell by cell.example the file reads: 1 1 1 1 0 0 1 0 1 1 1 1 so i want arr[0][0]=1,arr[0][1]=1,arr[0][2]=1...... Can someone please help me with this..I am stuck …

Member Avatar for stultuske
0
626
Member Avatar for murali2489

Hi All, I have come across Read and write method from InputStream and outputstream but im finding it hard to understand the logic behind it. Below is a simple example which reads a jar file from input stream and writes it to output stream. Please explain the logic on how …

Member Avatar for JamesCherrill
0
305
Member Avatar for anku83

Here i have this code which read from a text file and fills the 2d array.Then calculates the sum of each column.I want all those column names whose sum is greater than 5 to be written in output file. /* * To change this template, choose Tools | Templates * …

Member Avatar for stultuske
0
243
Member Avatar for sk8ergirl

I have this array Array myArray = {1,2,3}; I want to print the output of the array as follwoing 1,2,3 but when I do this for(int i=0 ; i < myArray.length ; i++){ System.out.print(myArray[i]+","); } however I get this output 1,2,3, how can I get rid of the last comma

Member Avatar for Tarek_2
0
159
Member Avatar for Transcendent

A parking garage charges a $2.00 minimum fee to park for up to three hours. After three hours, the garage charges an additional $0.50 per hour. However, the maximum fee will be $10.00. No one can park over 24 hours. This is what I have: public double calculate(double hours){ if(hours …

Member Avatar for Tarek_2
0
210
Member Avatar for pwolf

one of my goals for this year is to learn java, and I found an excuse to get started lately. So over hte last couple of hours I have been reading tutorials and the likes, and started following the advice from this post http://www.daniweb.com/software-development/java/threads/99132/starting-java-java-tutorials-resources-faq As such I am up to …

Member Avatar for JamesCherrill
0
344
Member Avatar for Varunkrishna

Hello everyone I have created a java program using jsch0.1.50.jar to remove the directories in the sftp server. But I could not remove the folder "03-03-2014" as it contains a subfolder named "1837hrs" when I try to run the program I am getting the following error: > 4: The directory …

Member Avatar for masijade
0
1K
Member Avatar for beauty.is.raven

Write a Java application that prompts and reads a value representing the radius, of a circle, then prints the circle's circumference and area. I do not know where to start

Member Avatar for jwenting
0
401
Member Avatar for sciprog22

Hello, I have a Client/Server program where the Server sends a string with a time delay using a Timer object to the Client. The Client has a JFrame with a JTextArea for display. When I test the Client program, I ran into two issues: a) Nothing ever shows up on …

Member Avatar for sciprog22
0
428
Member Avatar for anisha.silva

Hi, Im just new to this language and I would like to know what does this groovy regular expression match too. I was not able to figure it by online articles.if some would would give an explanation i would greatly appreciate. the 3 regular expressions are : static propertyPattern = …

Member Avatar for anisha.silva
0
218

The End.