3,978 Topics

Member Avatar for
Member Avatar for deepak_gurav22

Here is the code that I have written please check what is wrong, as I am not able to display Images on canvas. I am trying to create game. package PuyoPuyo; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JButton; import javax.swing.JFrame; import …

Member Avatar for deepak_gurav22
0
158
Member Avatar for ajrobson

I got this servlet off of coreservlets.com i want to know how i can edit it so that it connects to my database to get catalogItem instead of using static html. /** A catalog that lists the items available in inventory. * * Taken from Core Servlets and JavaServer Pages …

Member Avatar for jwenting
0
87
Member Avatar for totengtoh

/*please helpme! how can i get the number of times on how i attemp to get the correct answer! please help me customize my inputbox i am new to this! this is a project of mine please help:mrgreen: :mrgreen: :mrgreen: */ import java.util.*; import javax.swing.JOptionPane; public class Project{ public static …

Member Avatar for Dukane
0
89
Member Avatar for hjc

i am sure that i am way off but i will attach the problem and hope someone can point me in the right direction. thanks in advance for any help given. i am trying to created a program that will write a grading program for a class with the following …

Member Avatar for jwenting
0
121
Member Avatar for freesoft_2000

Hi everyone, I have a general poll question. You see i have some software applications that i would be putting on a website. For example some of these applications are a spread sheet, a html processor, a word processor, an archiver/unarchiver and many more. The thing i don't know what …

Member Avatar for freesoft_2000
0
596
Member Avatar for Zahsan

The problem An audio signal is sometimes stored as a list of int values. The values represent the intensity of the signal at successive time intervals. In a program these will be stored as an array. Often a small amount of noise is included in the signal. Noise is usually …

Member Avatar for iamthwee
0
111
Member Avatar for Nuwang

[tex] pls modify this program and reply.[/tex] [QUOTE] I have 3 points ask from u. 1. I could increase Font size and Button sizes But in first form still I cant mange spacing in Box layout which I used as totally fill the form 2. Want to manage Second form …

0
48
Member Avatar for Lunaticrr

import javax.swing.*; public class Pool { public static void main(String args[]) { int input1; int input2; int input3; int Volume; input1=JOptionPane.showInputDialog(null,"Enter the length of the swimming pool:"); input2=JOptionPane.showInputDialog(null,"Enter the width of the pool:"); input3=JOptionPane.showInputDialog(null,"Enter the average depth of the pool:"); Volume=input1*input2*input3; System.out.println("The volume for the pool is: "+ Volume); } …

Member Avatar for karthikbgl
0
135
Member Avatar for freesoft_2000

Hi everyone, I am currently trying to use a JTextPane as a cell renderers for a JTable but it does not seem to work although the program compiles. I alsways get an error stating class cast exception saying that i must cast the editor component to JTextField instead of a …

Member Avatar for Phaelax
0
218
Member Avatar for dan2see

When is a programmer not a programmer? When he's not programming. For the last few years I've been working in retail stores. Well that's OK because I love working with people, and it's flexible. This year I've been in the mountains, climbing and hiking. Well that's more that OK, it's …

Member Avatar for happygeek
0
51
Member Avatar for PPaul1

I'm trying to figure out how to add a reset button and a calculation button to my program. I'm lost here. The program works when the user put in the loan amount, lenght of loan and interest rate. I need a button to reset the fields so another user can …

Member Avatar for masijade
0
273
Member Avatar for krauz2

[COLOR=#000000]I am having trouble getting this program to work. This is my first applet and I can’t seem to get my mind around how to get the commands in correct format. I have completed this program in application and gui with no problems, but applet format is not working in …

Member Avatar for p.bondam
0
137
Member Avatar for krauz2

Hello everyone. I have been working on this program for over a week. I really need some help getting this done. I was able to get the math.random to work but when I run my program as an applet I have a text box that I dont know how to …

Member Avatar for p.bondam
0
159
Member Avatar for JesQi

HI, i'm new in JAVA i creating a "GUESS NUMBER GAME".. which allow user 3 changes to guess.. i'm new to java so i need a simple coding... i has done the part but i dun wan to combine all function in main... this is my problem, i hope u …

Member Avatar for iamthwee
0
84
Member Avatar for krauz2

[COLOR=#941edf] [COLOR=#555555]Hello everyone,[/COLOR] [COLOR=#555555]This is my first java class and I am trying to understand the terms and different types of programs. I finished my program as an application then did it as a gui without realizing it had to be in a applet. It feels like I just learned …

Member Avatar for masijade
0
104
Member Avatar for PieMan2004

Greetings, Ive came across problems while doing a tutorial work piece. i've to design a toobar ( yup a JToolBar ) with 5 buttons inside it, that will do certain functions for a JSlider.( set them at certain values ) Its simple enough to go and write 5 buttons into …

Member Avatar for jwenting
0
99
Member Avatar for dguzai

dear all, i have a problem in creating a triangle custom cursor in my paint program. i had tried to use a GIF file type of triangle shape but nothing happened. could anybody please help me? below is the paint program thank you in advance. package org.me.hello; import java.awt.event.*; import …

Member Avatar for iamthwee
0
123
Member Avatar for coolest_987
0
83
Member Avatar for bluebird

[COLOR=#000000]Hello Everybody![/COLOR] [COLOR=#000000]I would like to tokenize the text file and save the token into the array.[/COLOR] [COLOR=#000000]I will tokenize a sentence if it starts with “[(“ and consider the sentence ends when it meets “)]”[/COLOR] [COLOR=#000000]For example, if a text file contains[/COLOR] [COLOR=#000000][(I love[/COLOR] [COLOR=#000000]Rose)][/COLOR] [COLOR=#000000]Please help me[/COLOR] [COLOR=#000000][(Thanks …

Member Avatar for Phaelax
0
226
Member Avatar for Gorilla

I have created a project using Jython (there was no bug in compling it by my IDE) I also have read the topic named [B]Py2exe help [/B](Ene Uran---Oct 23rd 2006 6:43 pm) and I can tell you that it really helped me so much. But in this project, I cannot …

Member Avatar for bumsfeld
0
179
Member Avatar for aripaka

Is there any class in the swing package in java like the List View in the VB...Just to recall..the List View is one List box with icons ..best example is windows explorer...I was trying the possibilty to simulate the same in java...Anyone Please help me out in this...

0
57
Member Avatar for LSPUWILLC

This year I started learning Java in class and now we are making a Vending Machne code... I compleated the task, but now I want to add another buton, but I get stuck a a sertain point... Here is my original code with the second button added: import java.awt.*; import …

Member Avatar for LSPUWILLC
1
691
Member Avatar for mario_atl

This forum is excellent. I've doing this practice project in drawing PostalAddress GUI i created the jpanel and jframe also PostalAddress.java file but its sems i got lots of error every time i modify it please take a look and help me i've shown lots of effort thanks guys. // …

Member Avatar for mario_atl
0
265
Member Avatar for rinoa04

Hello, I am interested in knowing your opinion in Java GUI development using AWT and Swing. Each have its own pros and cons. I am wondering which one is most preferable by java developer. AWT or Swing or Both? Please state your reason. Thank you.

Member Avatar for rinoa04
0
75
Member Avatar for hemanthjava

[B]Probelm: [/B] I have 2 panels in my main container. The jplTop Panel is what with I am concerned. I have set its layout as[B] jplTop.setLayout(new GridLayout(2,4));[/B]. So as per the layout setting I must have 4 components on the 1st row and 2 components on the second row. But …

Member Avatar for DavidRyan
0
90
Member Avatar for MNR

Hi, I have to make a snake game. i need an array to store allposition of the snakes body. i will also need a variable to store the number of parts in the snakes body. I know that i have to use the number of parts ++ but i dont …

Member Avatar for iamthwee
0
642
Member Avatar for jeffrey296

Hello to anyone who can help me. I'm a freshman in comp sci and here is my problem: I need to have the user type in a number in a JOptionPane input box, and I need to change the number they input into a double. Here's what I have, it …

Member Avatar for cms271828
0
138
Member Avatar for hemanthjava

[code]/* Java Swing Calculator */ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JTextArea; public class Calculator extends JFrame …

Member Avatar for cms271828
0
169
Member Avatar for silentcreeper

ok I poseted about an assignment that i had to do for my Java programming class. Now i have attempted it and i have kind of gotten it to work but its not working properly ... i have no idea what i'm doing wrong ... please help me fix my …

Member Avatar for silentcreeper
0
119
Member Avatar for higherGround574

Hey guys, I'm for the most part a backend programmer but I'm taking a GUI class as a elective, and I'm haveing some problems with an applet. Part of the assigment is to create a logo design that displays a bunch of pentagons in a circle with different colors and …

Member Avatar for higherGround574
0
184
Member Avatar for vick

Hi how's everyone doing, please help me with this program, i am doing this from last 4 to 5 hours, it's over my head, please help. here's the what program suppose to do: Given an input data file containing dates, one date per line, write a Java application Project.java which …

Member Avatar for masijade
0
186
Member Avatar for sciocosmist

I am having some trouble trying to get a JApplet to display in a Browser [IMG]http://javafaq.nu/images/smiles/icon_sad.gif[/IMG] . The applet does compile and does come up (displays) in a Microsoft Windows window frame, but does not display in a browser. I have several components that I place in JPanels and successfully …

Member Avatar for ede
0
314
Member Avatar for AnaisTrois

Hello - I am a newcomer to this forum (referred by HappyGeek) and am utterly unable to find an answer to the following question, despite the hours I have spent parsing through posts on forums, exchanging e-mails w/kind souls more knowledgeable than myself, etc. I am in the process of …

Member Avatar for AnaisTrois
-1
125
Member Avatar for ghackprime

I no the problem is not with the program its with my pc. I am able to compile this program fine on my school's pc but i can't on my laptop. The program is public class SwingIO { public static void main(String[] args) { /* (To contrast this sample with …

Member Avatar for rinoa04
0
477
Member Avatar for stonemonolith

Hello. I'm new to Java and, I'm trying to set up a frame with an Exit Button that uses an event handler. But, it isn't working - here is the code, am I missing something? It isn't even getting inside the if statement. Any help would be appreciated import javax.swing.*; …

Member Avatar for stonemonolith
0
109
Member Avatar for Antiparadigm

Hello all, I've got an assignment due on thursday that is very easy, but I have one bug that is driving me nuts. The assigment is to just create a basic GUI with 1 label, a text box, and a few check boxes, so it's not that hard. The problem …

Member Avatar for Antiparadigm
0
142
Member Avatar for Comtek1980

I am having trouble correcting the errors in my application to get it to compile. My deadline for this app is Oct. 1. I would appreciate if a fresh set of eyes could look at my code and see where I'm going wrong. Thanks [code] import java.util.Arrays; import javax.swing.*; import …

Member Avatar for Phaelax
0
54
Member Avatar for freesoft_2000

Hi everyone, I currently have a JTextPane using a html document and i am trying to serialize the html document contained in the JTextPane to the disk but i have run into some problems. One problem lets say for example if i were to press the space bar five times …

Member Avatar for jwenting
0
143
Member Avatar for syskata mitev

please help me. i need a simple demo projects write on netbeans platform incuding swing with JDBC . if you have any ideas where i can get it write a massege here. thanks

Member Avatar for peter_budo
0
41
Member Avatar for ryy705

Hi, I need to learn how I can use a custom data structure in a JList. In my program when I click the Add button next to the JList a JOptionPane opens and takes a String input. The input is then used to create an object which is placed in …

Member Avatar for ryy705
0
195
Member Avatar for ryy705

What is the best way to design gui? Is java's swing strong enough? Or should learn something like jaxx or JFace? What do you guys use?

Member Avatar for hooknc
0
218
Member Avatar for pfr

Hi this is my first time posting here :) i was working on a text editor that can use 1.total number of words 2.number of unique words (not case-sensitive, ie 'Table' and 'table' are the same word) 3.the word with the highest occurrence 4.the list of unique punctuations used in …

Member Avatar for server_crash
0
167
Member Avatar for atulajawale

Hello friends i am working on an image loader in java which allow user to drag and drop folder of images into JTable and showing the thumbnails but drag and drop of folder takes too much time to load thumbnails in table cell .. package org.tempuri.eyestudio.swg; /* * FileAndTextTransferHandler.java is …

Member Avatar for atulajawale
0
148
Member Avatar for sciocosmist

I am having some trouble trying to get a JApplet to display in a Browser. The [applet](http://javafaq.nu/images/smiles/icon_sad.gif) does compile and does come up (displays) in a Microsoft Windows window frame, but does not display in a browser. I have several components that I place in JPanels and successfully place those …

0
70
Member Avatar for korbynlehr

I have some code that I need help with. The code compiles but I get a runtime error. Here is the error and the code: ERROR: Exception in thread "main" java.lang.Error: Do not use MessageLog.setLayout() us e MessageLog.getContentPane().setLayout() instead at javax.swing.JFrame.createRootPaneException(JFrame.java:465) at javax.swing.JFrame.setLayout(JFrame.java:531) at MessageLog.<init>(MessageLog.java:23) at MessageLog.main(MessageLog.java:90) Press any key …

Member Avatar for hooknc
0
165
Member Avatar for ryy705

Hello, I am novice programmer and I am experimenting with swing. I created a scrollabe text area that seems to scroll great when I hold down a key for a long time. But, when I select a different tabbed pane and then come back to the pane containing the text …

Member Avatar for hooknc
0
118
Member Avatar for indienick

I have a question about creating my own custom classes. I want my own class - NButton. The idea of this class was to quickly make JButtons, by adding my own custom argument sets. Here's my prototype for this: [code] import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; /** * NButton - …

Member Avatar for indienick
0
117
Member Avatar for korbynlehr

I am having trouble getting my timer class working with my scoreboard frame and application. Any constructive help is appreciated. [code] public class ScoreboardTimer extends Thread { private int counter; // the number of seconds remaining on the timer private boolean isRunning; // toggle variable that controls whether the counter …

Member Avatar for peter_budo
0
169
Member Avatar for indienick

Ok, I know this is a stupid-easy question, but how do I "gather" (best word I could think of) an image? [code] JFrame frame = new JFrame(); Image programIcon = (...?...); frame.setIconImage(programIcon); [/code] My main issue is that since Image is abstract, I can't exactly go " = new Image("yadda.png");" …

Member Avatar for indienick
0
167
Member Avatar for LBasa

Hey Guys, I've never used JLabel and JText Area before and this specific project requires it. I'm trying to create something that allows entry of student name, id and 2 grades. Then get the average of the 2 tests and show the letter grade equivalent. I'm getting error messages that …

Member Avatar for ranjanbaisak
0
603

The End.