31,001 Topics

Member Avatar for
Member Avatar for gstang95gt

I am in my final weeks of my first Java Class. I have the next part of my program due over the weekend and I am stuck. The assignment is as follows: Modify the Inventory Program to use a GUI. The GUI should display the information one product at a …

Member Avatar for peter_budo
0
78
Member Avatar for Logi.

Hi there, Im not very good with coding UIs but having to do one for a program im writing atm.... I have two windows in seperate classes and they both extend JFrame. From Window A i open Window B from the menu options but when i then want to close …

Member Avatar for masijade
0
101
Member Avatar for kashn

Please tell me how/where is it explained on using Java Tables? I know about JTables, but the problem with that is that I can't seem to get rid of the onClick MouseEvent on that... I need a static table basically with 2 columns and 1 row. ~ Thanks!

Member Avatar for kvprajapati
0
93
Member Avatar for exzibit23

i already connect to internet. but if im trying to access the site, it only gives me the code (page source) of it. why is that?

Member Avatar for exzibit23
0
66
Member Avatar for kingarthur

Hello everybody! I want to create a JTable (showing data from mysql..) on a Panel. But I dont get it..nearly every method is unavailable. Here is my code for creating it on a frame: [code] package gfx; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.*; import java.sql.*; import java.util.*; import …

Member Avatar for cruzer45
0
143
Member Avatar for shakeelahmed22

what is the difference between throw and throws clause in java???? mmm.....i no that all methods in java use the throw statement to throw an exception and the throw statement requires a single argument : a throwable object.... but plz can any1 tell me the function of the throws clause?????

Member Avatar for shakeelahmed22
0
106
Member Avatar for still_learning

I am still kinda new to programming and I have a questions (yes it is a homework question), but I am not looking for you to give me the answer. I would like someone to explain to me how to go about determining the number of key comparisons for an …

Member Avatar for kvprajapati
0
379
Member Avatar for kashn

Is it possible? Like bringing a drawn image in the paint for JApplets? Is there any way to set a order of whats on the most top? Because I'm using a JTextArea, and have it do setText on the JTextArea while inside paint(Graphics g) and having it draw the image …

Member Avatar for kashn
0
61
Member Avatar for kashn

Hi, Is there a way to format a string into a paragraph format? The closest thing I got was entering the string into a JTextArea, but the only problem with this is that the words get split in between its characters making it almost seem like two different words.... - …

Member Avatar for kashn
0
172
Member Avatar for grommet2481

So im trying despritely to understand how to create a maze and find the shortest path. I would just like to first understand how to create a maze. Theres no need for it to be outputted at this stage, I just want to understand how it works. I found this …

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for BestJewSinceJC

from Java Sun's JavaBeans tutorial: "The accessor methods for a bound property are defined in the same way as those for simple properties. However, you also need to provide the event listener registration methods forPropertyChangeListener classes and fire a PropertyChangeEvent (in the API reference documentation) event to the PropertyChangeListener objects …

Member Avatar for Ezzaral
0
188
Member Avatar for freelancelote

Hi, I'm starting with Java and have an issue with how to use the classpath variable and where to put certain library. This is probably pretty easy but it's got to the point of driving me crazy. Now, I'd like to have my library, let's call it "mylib", under C: …

Member Avatar for JamesCherrill
0
192
Member Avatar for KeepGoing

Hi I'm just starting out with OOPin JAVA and thought i was getting the hang of it but i've been given an assignment and it's got me stumped. here is the code i have been given [code=java] public class FrogCalculator { private Frog operand1Frog; private Frog operand2Frog; private Frog unitsFrog; …

Member Avatar for VernonDozier
0
145
Member Avatar for exzibit23

hello, im a beginner programmer in java (J2ME), is there a way on how to unobfuscate a java? and how to obfuscate it?? (J2ME)

Member Avatar for masijade
0
336
Member Avatar for Gman36

Hi all, I am having a problem with the synchronizing the threads in the classic produce consume thread example. Below is my code for it. [CODE]public class Magpie extends Thread { private TreeHole treehole; private int number; public Magpie(TreeHole t, int number) { treehole = t; this.number = number; } …

Member Avatar for kvprajapati
0
109
Member Avatar for grisha83

My method is not working for some reason, even though i have done in exactly the same way the books showed. Could you please take a look at it and let me know what went wrong? Thank you P.S. I tried to use DEBUG technique and it seems that the …

Member Avatar for grisha83
0
76
Member Avatar for RupeshParajuli

Hello Guys, I'm considerably Newbie to any programming whatsoever, and i'm having to take Java for my computer Science requirement. I'm currently working on an homework assignment to write an application that reads the (X,Y) coordinates for two points. I also need to compute the distance between them using the …

Member Avatar for shantechi
0
489
Member Avatar for didi00

Can someone help me to make a program in java: 1. Generate 2 rows of 50 random numbers (int) from 0 to 99. 2. Search the numbers that appear in the first row, but not in the second, and numbers that appear in the second row but not in the …

Member Avatar for shantechi
0
155
Member Avatar for Talguy

I am trying to develop an application for my phone that will communicate with my personal linux server. The phone application will not be java based but the server will be. The Server will be sending me information from my database to my phone. How should I package my data …

0
52
Member Avatar for redZERO

Hi guys, I want to paint multiple layers of images onto one image. I'm going to be using BufferedImage for this. How would I go about painting these multiple images onto one (in essence creating a new image. sort of like a collage)? Would i get the graphics context and …

Member Avatar for redZERO
0
360
Member Avatar for squinx22

Hello all, I am having a problem in creating an image by using createImage() method when trying to load large files. FileConnection fc = (FileConnection) Connector.open("file:///" + path + "/",Connector.READ); InputStream fis = (InputStream) fc.openInputStream(); image = Image.createImage(fis); // I got the out of memory exception here. Are there any …

Member Avatar for articlemaster9
0
104
Member Avatar for gitech

Hai Friends, iam using udp connection for my project in j2me, its working fine, but i doknow how to set timeout for the Datagram connection. because there no server means it doesnot give exception. my code is given below [code] [COLOR="Green"]public String UDP_Client(String str) { String UDP_RString=""; String UDP_Senddata = …

0
68
Member Avatar for brandongood

Hello, I am getting the following errors: unexpected type line 433 operator + cannot be applied to <any>,double line 433 operator + cannot be applied to <nulltype>,double line 433 incompatible types line 433 unexpected type line 441 In the below file. I know its probably something simple, but could use …

Member Avatar for poeticinsanity
0
200
Member Avatar for KirkPatrick

Hey guys, got another question for you. I have a program that displays a new bean on my jPanel for each piece of data that it picks up from a file. I was wondering if there is an easy way to always have it display my bean to the northwest …

Member Avatar for KirkPatrick
0
98
Member Avatar for redZERO

Hey guys I'm using JLayeredPane because i want three distinct layers in my program. terrain, buildings and then characters. I thought that JLayeredPane was easily the best choice for this context. The problem is, I have only seen people *adding* components to their layers. I need to do my own …

Member Avatar for JamesCherrill
0
219
Member Avatar for Virux

I have been testing a application I made, which is a simple swing interface with a checkbox. I am using custom icons for my checkbox, for checked, checked and mouse-over, unchecked, and unchecked mouse-over. I am using the eclipse IDE. Eclipse creates your application in the workspace file, so the …

Member Avatar for JamesCherrill
0
82
Member Avatar for eng_mary

Hi every one. suppose i have Car class: [CODE=java]public class Car{ int id; int speed; public void move(){ ... } ..... }[/CODE] that have to run in Race class: [CODE=java]public class Race{ Car[] cars; .... public void runRace(){ .. for (int i=0; i<cars.length; i++) { cars[i].move(); //here is my problem …

Member Avatar for eng_mary
0
174
Member Avatar for danilopena
Member Avatar for shilpa_mk
0
72
Member Avatar for danilopena

So I've been "studying" java for two semesters, and my teacher is not what you would call the best. I was just wondering if any of you guys could help me out with some questions I have... What is a recursive termination condition and what happens if a recursive function …

Member Avatar for BestJewSinceJC
0
80
Member Avatar for Riv3n

Hello, I'm currently working on a project which requires me to provide an [B]upload and download file manager with pause and resuming[/B] functionality. Much like GetRight with its GUI but with upload and download function. This project is PHP based and I believe that PHP can't do what is required …

Member Avatar for Riv3n
0
106

The End.