35,618 Topics

Member Avatar for
Member Avatar for caswimmer2011

Hello, I got a MacBook Pro for college and i'm trying to program on it. It's all good except when i use the robot class, i don't see any key codes or key events for keys such as function, option, and command. Can i use those keys when using the …

Member Avatar for harinath_2007
0
3K
Member Avatar for thompsonSensibl

Hi there, I am [B]stuck[/B] with a problem, and don't know where to start. I am given a series of cities, and their locations in [B]longitude and latitude[/B]. The goal is to find the two cities with the shortest distance. I have an algorithm which, given the geographical locations (longitude …

Member Avatar for NormR1
0
305
Member Avatar for baby_c

Hello friends.I got some problems with a program I'm developing for a assignment. I want to add a image(background) to my Jframe and add some buttons. I wrote the code. I can load image into the frame but when I create the Jbutton and re-size it to smaller button it's …

Member Avatar for baby_c
0
27K
Member Avatar for -acir-

[ICODE] I would like to ask assistance how I can retrieve all the scores every game. And how to add the points by not incrementing game 1 and game 2 and so on.. THank you... [/ICODE] [CODE] /* * To change this template, choose Tools | Templates * and open …

Member Avatar for -acir-
0
217
Member Avatar for purijatin

Hello, The problem is that some how due to garbage collection timings I am having tradeoff's in my performance. The issue can be generalized as: [CODE] public void loop(BlockingQueue<Runnable> queue) { for(Runnable runnable : queue)//line2 { runnable.run();//line4 if(Math.random() > 0.9) System.gc();//line5 } //line7 } [/CODE] Now normally the queue passed …

Member Avatar for purijatin
0
130
Member Avatar for warlord902

I am in situation like I have a class which have two different subclasses. [CODE]public class SuperClass{ String st; public String getSt(){ return st; } } class A extends SuperClass{ } class B extends SuperClass{ } [/CODE] Now I have another method that want to access the getSt inherited method …

Member Avatar for javaAddict
0
177
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
156
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
207
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
128
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
87
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
116
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
737
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
148
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
157
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
110
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
122
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
116
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
186
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
129
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
256
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
193
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
230
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
161
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
165
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
628
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
161
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
173
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
161

The End.