32,204 Topics

Member Avatar for
Member Avatar for warlord902

I am facing a strange problem, and seriously I spend lot of time in experimenting different things to get it work but all in vain. I have a JTree whose nodes are been modified by my custom TreeCellRenderer class. My class creates a JPanel for every node and places components …

Member Avatar for warlord902
0
155
Member Avatar for yinp

Hello, I would like to know what is the best way to populate a tree gui which has the following details: My application should reflect a tree structre with about 8000 members but directly under the root there are maximum 15 members.Its clear that each time a user open the …

Member Avatar for JamesCherrill
0
200
Member Avatar for janice91

Dear experts, Please kindly advise me in how i should write the column operation: The following is the full codes: [CODE]import java.util.*; public class Matrix { public static void main(String[] args) { // declare the necessary variables int N, M; String operator; int index; int sum; int [][]matrix = new …

Member Avatar for javaAddict
0
126
Member Avatar for Samar Sharma

Hi this is samar here I'm developing a application in which i want that when some one press print button the info in the form get printed I'm developing my application in netbeans 7.0.1 pls help

Member Avatar for RvSon
0
85
Member Avatar for superjj

I have a very stupid question. I use a JToggleButton. now I want to know if the setSelected is true or false. thus an if function, but how to write one because I get errors. thank for your support [CODE]if(Btn2.setSelected() = true){ }[/CODE]

Member Avatar for superjj
0
113
Member Avatar for Upoma

I am developing a desktop based software in Java using IDE Netbeans 7 and database MySQL. Now i want to distribute this software and protect it from piracy.I want to implement online licence verification.That means when user will install the software a number based on hardware configuration will be sent …

Member Avatar for hfx642
0
734
Member Avatar for khurram01

I am working on simulation and i need to display data to TextArea or JTable, that is generating continuously at run time. ----------------------------simulation class---------------- Class Simulation() { when Nubmer Generate call method ' updateData' in Frame Class to upload on JTextArea. } -----------------------------------frame class--------------- Class JFrame() { Method updateData(string data) …

Member Avatar for NormR1
0
1K
Member Avatar for optikali

Hello all! I am generating a random int between 0 and 75: [CODE] public static int rand(){ int num = (int) (Math.random()*75); return num; }[/CODE] How would I generate the same range of numbers but with a 70% bias for the lower half of possible numbers? I thought I might …

Member Avatar for JamesCherrill
0
1K
Member Avatar for coco24

Hi, Im new to java and I can not figure out where I am going wrong in this code. I need to take the value from the arguments in the run configuration. I the values are in args[] array and if there is more than one argument I need to …

Member Avatar for Rameshwar Soni
0
147
Member Avatar for thompsonSensibl

Hi, I have an array, and it must be sorted. The array's objects have associating values. For example, an array of city details contains these information [I]per object[/I]: (String) cityName, (double) cityNumber, (int) cityNumberOfPets. [CODE] //e.g. city[0] = ("Chicago", 243.2, 14); city[1] = ("New York", 25.3, 15432); city[2] = ("Dallas", …

Member Avatar for JamesCherrill
0
155
Member Avatar for D3X

Hey guys,when i go to enter the same account number as i am logged into as well as any other account and click ok the error message displays however it does not stop me from progressing to transfer money to myself. I have had a shot at it however as …

Member Avatar for JamesCherrill
0
108
Member Avatar for nera1981

I have this code: [CODE]import java.sql.*; import java.util.ArrayList; public class Car { private int id; private String model; private String color; private Double price; public void setId(int id) { this.id = id; } public int getId() { return this.id; } public void setModel(String model) { this.model = model; } public …

Member Avatar for nera1981
0
121
Member Avatar for jinglylime

Hi, I need to write a system that simulates buying and selling on the stock market with just text outputs. I need to create a menu so the user can register and delete thier account. Also be able to buy and sell shares. So far I have my classes and …

Member Avatar for JamesCherrill
0
114
Member Avatar for tmcpro

I am looking to create a program that works similarly like wolfram alpha but on a much more basic level. It will use things like weather, directions, restaurants in an area etc. Im looking to some how build this system (elementary) so that it can accomplish something like this: [url]http://www.wolframalpha.com/input/?i=weather+in+new+york+on+tuesday[/url] …

Member Avatar for mKorbel
0
185
Member Avatar for Majestics

As the title stated i want to show tooltip when the user press up and down keys in combo box, Please any hint ..... Regarding to problem

Member Avatar for mKorbel
0
126
Member Avatar for thompsonSensibl

Hi I am having trouble at finding a way to iterate through a string of alphabets until a digit is reached. e.g. iterating through [CODE] //Using a scanner, I can use scanner.getNext() to get the first word. //There may be more than one word; there is no way to tell; …

Member Avatar for NormR1
0
254
Member Avatar for davetheant

Hello. I have tried numerous string permutation methods, and they work, but not for what I need. I need to permute a string such that I don't get any reversals: abcd abdc acbd acdb adbc adcb * bacd badc bcad bcda * see how these are reversals of each other? …

Member Avatar for NormR1
0
191
Member Avatar for MissJava

Hi all, I really need your help on this as I am just learning Java. I do have an error message which says "cannot find symbol on line 23. Many thanks. [CODE] import javax.swing.JOptionPane; public class averageRainfall { public static void main(String[] args) { //declare variables String[] Month = new …

Member Avatar for MissJava
0
228
Member Avatar for vishalbhavsar

hi all, i am trying to do a mini project in java which is totally console based. please suggest me few topics for it...

Member Avatar for amrita111
0
158
Member Avatar for newbie14

Dear All, I have read dateTime field into a string from mysql database and in my java I have another dateTime in string format and in same format as the mysql date time and would like to compare both to see which one is before?

Member Avatar for newbie14
0
163
Member Avatar for Digitalwolf

Hello everyone, i write mostly in java but have recently started picking up c and c++, and i was wondering if there was an equivalent to the java date class in c++ or c? I've searched for a date.h and came up empty.

Member Avatar for Digitalwolf
0
624
Member Avatar for Fatima10

Hello, I want to run a java project but I can't run it . you can download here : [url]http://www.persiangig.com/pages/download/?dl=http://fatima10.persiangig.com/document/bankapplication3.zip[/url] The error is : Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - cannot find symbol symbol: class ResultsModel location: class bankapplication3.Display2 at bankapplication3.Display2.<init>(Display2.java:35) at bankapplication3.Database.<init>(Database.java:9) . . . I'm …

Member Avatar for javaAddict
0
160
Member Avatar for thompsonSensibl

Hi there, I am trying to get the words (city names) from a user input. For example, the inputs: [CODE] String input1 = "Pyeongchang 135135.13 531.351"; //Note: "Pyeongchang" is of one word. String input2 = "New York 3543.25 25352.523532"; //Note: "New York" is of two words. [/CODE] I need to …

Member Avatar for JamesCherrill
0
171
Member Avatar for Upoma

I need the dates in a specific range.And i want to get the result in java manipulating from a MySQL database.Now how can i do so. Suppose there are 3 days 17.08.2011,18.08.2011 and 19.08.2011 .I want the dates in the range 16.08.2011 to 18.08.2011 .So how can i manipulate it …

Member Avatar for mKorbel
0
158
Member Avatar for muaazab

Hi, I am learning to work in JAVA. I have gone through the basic concepts, understood and experimented small codes successfully. The point where I have been stuck is garbage collection, finzalize() method and System.gc() method. I have searched these on Google but all the explanations are in high-tech language …

Member Avatar for JamesCherrill
0
248
Member Avatar for EL69

I'm taking a Java class and need some help. I need to create a java class tp accepts a users houlry rate of pay and number of hours worked and will display the users groos pay, the withholding tax 15% of gorss pay and netpay (gross pay - withholding) here …

Member Avatar for Majestics
-1
179
Member Avatar for vishal1949

I made a program and want to enter previous dates into a linkedList. My code is [CODE]package bowlinggame; import java.util.Date; import java.util.LinkedList; import java.util.TreeSet; public class BowlingGame { public static void main(String[] args) { TreeSet <String>PlayerNames = new TreeSet<String>(); PlayerNames.add("Steve"); PlayerNames.add("James"); PlayerNames.add("Bob"); for (Object o : PlayerNames) { System.out.println(o); } …

Member Avatar for JamesCherrill
0
108
Member Avatar for vishal1949

I am making a program of a bowling tracker. I made four names and then I have to add specific dates they played and then the score they got on those days. Then print to screen the names, the number of games they played, average score, last games score and …

Member Avatar for NormR1
0
411
Member Avatar for Genericusername

Hello, I have written some code that spans 5 different files, which are all in a folder called Employee. The code runs fine without a package, but i have an assignment to package them. When i try to compile the object method which contains all the get and set methods, …

Member Avatar for Genericusername
0
144
Member Avatar for warlord902

I am using netbeans 7.0 in windows 7. The problem I am facing is that when we design any frame in GUI builder of netbeans then it uses Windows Look and Feel always, so i need to design according to that. So as long as I use windows look and …

Member Avatar for mKorbel
0
857

The End.