32,199 Topics

Member Avatar for
Member Avatar for rereni

Hello Programmers, is it possible to create new 1D array from 2D array? for example from this array String[][] ArrVal= { {"rec", "02"}, {"proc", "03"}, {"hscode", "10"}, {"sitc", "21"}}; take first column of ArrVal[i][0] and make this as new array with ArrVal[i][1] as value of new array, for example : …

Member Avatar for JamesCherrill
0
170
Member Avatar for Hypnos_16

I have an assignment question that asks us, given a test phrase, [CODE]// the first comment public class Test { // another comment public static void main( String[] args ) { // the main method String slashes = "//"; // ignore // in quotes System.out.println( slashes + " hi " …

Member Avatar for stultuske
0
206
Member Avatar for rammohanrao

Hi, i am working on liferay , i want to develop a sms application in liferay, if you have any code can you send me to <EMAIL SNIPPED> Thanks.

Member Avatar for stultuske
0
123
Member Avatar for wonderlandslost

So my instructor assigned us to create a program that calculates the area and stores that, along with coordinates, in an array. This has to be done for both triangles and squares. He is having us use separate classes for the project; the main Drawer class, parent class, square class, …

Member Avatar for wonderlandslost
0
303
Member Avatar for whateverme

Hey, I'm trying to work to display a number of jtextfield according to one of the given values in a combobox. So, I will have a drop down menu with let's say 1 to 4. If the user selects 3, 3 textfields will be displayed. I've created the jcombobox with …

Member Avatar for whateverme
1
141
Member Avatar for coolbeanbob

Just wondering if it is worth taking the time to learn the GUI packages, or do most developers use GUI designers? I am guessing the GUI designers are more often used by hobbyist, while the professional developers write the code?

Member Avatar for designuts
0
224
Member Avatar for therockon7throw

The puzzle The original puzzle is in Java [url]http://wouter.coekaerts.be/2012/puzzle-clowns[/url], so I tried to write it in C++ and post it here for your, so that you solve it and having some thing to think:-) There almost aren’t any rules; any cheating inside your code is allowed; it is the whole …

Member Avatar for therockon7throw
0
192
Member Avatar for TIM_M_91

Hi guys well I have successfully got my update query to work correctly. Now I have two tables in my database. What I want to do is when I click my play button not only does it update my column's in my first table but all updates my colunms in …

Member Avatar for TIM_M_91
0
186
Member Avatar for BleepyE

Hi guys, I need some help. Im trying to create a comment system in an applet. When a user enters a new comment all previous comments are shown below. The comments are taken from two text fields. At the moment im just storing the latest 2 comments in variables, I …

Member Avatar for DavidKroukamp
0
131
Member Avatar for baseballer

I'm just trying to teach myself how to use java.util.zip, but I'm struggling with one part I think. The code below is what I have so far, I'm just not sure how to actually get it to read in a zip file? Any help would be much appreciated. [CODE] import …

Member Avatar for DavidKroukamp
0
127
Member Avatar for glebovg

Create a class called CardDeck with a main method contents exactly as shown here: [CODE]{ String[] deck=new String[52]; createDeck(deck); for(int i=0; i<52; i++) System.out.println(deck[i]); }[/CODE] You should create a method called createDeck which populates the array you created in the main method. You must use four loops, each creates the …

Member Avatar for glebovg
0
258
Member Avatar for ForceStr

Hello, I'm here again with another issue. :) I have written almost every part of my program what I'm gonna need (I did it as separate projects). But now I need to create "main program". And I don't know exactly what is the best way to add these "parts" of …

Member Avatar for ForceStr
0
146
Member Avatar for dsmith12

Ok in this code the user has to type in their first and last name together otherwise it is invalid. I know I have to use some sort of java.lang.character but i do not know how to write it up. I know that it needs to be a part of …

Member Avatar for StephNicolaou
0
193
Member Avatar for AbdullahJava

How can i make the words in alphabetical order if there are not the same ??? [CODE]import java.util.Scanner; public class Alphabetize{ public static void main (String [] args) { Scanner input = new Scanner (System.in); System.out.println("Enter three words"); String Word1, Word2, Word3; Word1 = input.next(); Word2 = input.next(); Word3 = …

Member Avatar for stultuske
0
157
Member Avatar for kris222

this should be the output: 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 heres what i ve done so far: class za { public static void main(String[]args) { String x="abcdefghijklmnopqrstuvwxyz"; int ctr; …

Member Avatar for stultuske
0
96
Member Avatar for sahmeme

only the first item in the combobox will be returened even if i selected another item. HELP! [CODE] try{ //combobox of the products rs = stmt.executeQuery(query2); rs.last(); int i = rs.getRow(); String [] v = new String [i]; rs.beforeFirst(); i = 0; while(rs.next()) { v[i] = rs.getString(2); i++; //break; } …

Member Avatar for mKorbel
0
156
Member Avatar for rockstar03

I have been searching high and low to find something remotely close to what I am trying to accomplish and have failed, miserably. I have read Oracle and tutorials, but have a hard time comprehending everything related to java. It is all so confusing. I would just be grateful for …

Member Avatar for rockstar03
0
188
Member Avatar for johnarzoneecho

Hey, My program is to add images to database using class GUI in java. Ang i can not get into a code that can insert into database I'am using this codes: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.sql.*; import java.util.*; import javax.swing.event.TableModelEvent; import javax.swing.table.DefaultTableModel; import javax.swing.event.TableModelListener; public …

Member Avatar for johnarzoneecho
0
219
Member Avatar for bela_code

need a complete code for a car class with the following attributes; make model colour registration no of seats wheel type (alloy or hubbed) engine size (in cc)

Member Avatar for ztini
0
433
Member Avatar for scheppy

I am having a problem with setting JButtons so the are not opaque to i can see the image behind them. I also have a JTextfield and here it is working, I dont know what i am doing wrong, I'm creating a gui for the mainmenu of my game. here …

Member Avatar for scheppy
0
323
Member Avatar for kay19

Seem to be having trouble. The trouble i'm having is the calculateAverage, and a bit of the public static main void area. I'll explain: calculateAverage: What i'm suppose to do is read from the txt file. I tried doing the inFile.nextDouble part, but seem to be getting errors. i'm not …

Member Avatar for foxtich
0
3K
Member Avatar for tleverington1

Hello All, I'm in the process of making a GUI for a search engine, I have never coded a GUI before so just experimenting with user input in Textfields and also the use of ActionListeners and i'm having a slight problem. My code can pick up what the user has …

Member Avatar for tleverington1
0
191
Member Avatar for bela_code

need a complete code for a car class with the following attributes; make model colour registration no of seats wheel type (alloy or hubbed) engine size (in cc)

Member Avatar for NormR1
0
114
Member Avatar for fallen21468

I have looked this up and cant seem to find a solution. Nothing I can find will work with my code. I really need help because i am doing this for a class project and nothing will work. Heres what i'm trying to get it to work with. [CODE] import …

Member Avatar for fallen21468
0
14K
Member Avatar for RawrInYoMouth

Seem to be getting a can't find symbol error. Not quite sure how to fix it. Yes this is a homework problem, this is what I have done so far. [CODE] public class Flight { public String location = "Gate"; public String number; public Airport origination; public Airport destination; public …

Member Avatar for stultuske
0
311
Member Avatar for shiva7892

print the pattern 1 1 1 1 1 1 2 2 2 1 1 2 3 2 1 1 2 3 2 1 1 2 2 2 1 1 1 1 1 1

Member Avatar for JamesCherrill
0
68
Member Avatar for BleepyE

Im coding my first Java applet for a University project and im having issues. Im in the process of coding a search and information function. When the user clicks anywhere in the applet a black circle appears under the cursor, when they then press the information button, information about that …

Member Avatar for BleepyE
0
129
Member Avatar for elsiekins

Hello, Unforunatly had to replace my hard drive on my laptop so having to start from scratch, i already had eclipse installed, so when i went to reinstall, downloaded JRE and JDK and 32bit eclipse (my machine is 32bit vista) but i get the error message [I]"A java Runtime Environment …

Member Avatar for ejosiah
0
148
Member Avatar for mpound

Sorry to be a major pain in the ass. Im new to java and trying to figure out what to put in the path under Enviromental Variables. Heres the location of my javac. C:\Program Files\Java\jdk1.7.0_03\bin What would i write exactly in the Path location? Regards, Matthew ;)

Member Avatar for mpound
0
129
Member Avatar for kris222

so this is what the output should be: 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 heres what ive done so far class za { public static void main(String[]args) { String x="abcdefghijklmnopqrstuvwxyz"; …

Member Avatar for stultuske
0
145

The End.