3,978 Topics

Member Avatar for
Member Avatar for oali

Hi i have a teensy problem that i need help with, as i mentioned earlier in some previous thread (can't remember when!) i'm creatin an applet based tutorial. It's nearly finshed thank god except for the last applet i seem to be getting an error that i can't fix. heres …

Member Avatar for oali
0
108
Member Avatar for Alex Edwards

I'm getting ridiculous results in my program! Seconds work fine Decaseconds (1/10 of a second) work ok Centiseconds seem a bit off Milliseconds are completely off... Here's the code-- [code=java] import javax.swing.*; import java.awt.event.*; public class Clock{ private Timer t; private long startTime = 0, finishTime = 0; private boolean …

Member Avatar for Alex Edwards
0
142
Member Avatar for shinobi59

I am trying to just compile a very back program and it compiles but when I run it I get errors: Java version = java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode) Program HelloJava.java public class HelloJava { public …

Member Avatar for haxpor
0
108
Member Avatar for mysong

I need help adding tables in the payment area that shows the full payment plan. Also my months start high to low. I want the months to start with month 1 [CODE]import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.Math; import java.text.NumberFormat; import javax.swing.table.*; //Setup lables and buttons public …

Member Avatar for Phaelax
0
142
Member Avatar for dtfan6

Hi everyone ! This is my first new post, I have a problem with my Java code. I am trying to make a first applet, and have gotten this code from a book, "Java - An Introduction To Problem Solving & Programming", by Walter Savitch and Frank Carrano : [code] …

Member Avatar for dtfan6
0
136
Member Avatar for regent_royal

Hi, friends I am developing project in which I get some data from the database which is already saved as HTML. I can get get whole data which is simple HTML but this database content is developed as below. Word file first created save it as the web content and …

Member Avatar for Ezzaral
0
166
Member Avatar for sayedjustetc

By Sayed, June 25th, 2008 * Single tier applications are easier to design. Single tier applications mix data, presentation, business logic altogether. It is easier design but workload distribution becomes difficult. Moreover, software maintenance becomes a big headache. * Multi-tier applications can address these challenges. Here, the application, hence, the …

Member Avatar for stephen84s
0
191
Member Avatar for Venks

Hai Friends Iam using RMI concept for my project, i want to connect client and server by using internet connection , but its working fine on LAN connection, it gives following Exception [code] java.lang.RuntimeException: java.rmi.ConnectException: Connection refused to hos t: 125.17.11.229; nested exception is: java.net.ConnectException: Connection refused: connect at Client.init(Client.java:23) …

Member Avatar for Venks
0
224
Member Avatar for beamkirk

// I am trying to complete this for my class I am taking. Can anyone assist me in completing the task a ?Newbie is struggling with. [code] import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.*; // program uses class Scanner /** * * */ public class Inventory { /** * …

Member Avatar for Ezzaral
0
111
Member Avatar for perezfl

Hello all, this is just another student level program and I need some help with the final bit. This a program that gets input from a user and outputs teh student name, average grade, all scores highest score, etc. But I am having trouble outputing the scores (which are in …

Member Avatar for Ezzaral
0
114
Member Avatar for shwetha_cs26

jt = new JTabbedPane(JTabbedPane.TOP); jt.setTabPlacement(JTabbedPane.TOP); //panel1 jp.setPreferredSize(new Dimension (50,50)); jp.setLayout(new BorderLayout()); jp.setBackground(Color.BLACK); jp.setPreferredSize(new Dimension(60,50)); jp4 = new JPanel(); j = new JButton("Draw The Graph"); j.addActionListener(this); jp4.setBorder(BorderFactory.createRaisedBevelBorder()); jp4.setPreferredSize(new Dimension(180,40)); jp4.add(j); jp.add(jp4,BorderLayout.EAST); String[] a = {"select "}; lab = new JLabel("x parameters"); lab.setLocation(700,700); jp4.add(lab); jcb= new JComboBox(a); jp4.add(jcb); lab1 = new JLabel("Y …

Member Avatar for javaAddict
0
109
Member Avatar for regent_royal

Hi friends, I have[B] build swing based application on windows os and I want to run this application in linux.[/B] The .jar file runs perfectly on windows. but not running on linux. gives error as below. pls. help regent@regent:~/main the law$ java -jar thelaw.jar Exception in thread "main" java.lang.NoClassDefFoundError: while …

Member Avatar for regent_royal
0
174
Member Avatar for zyaday

Hey everyone, i'm working on this code...i'm trying to put some images ---animations--on to my jpanel..the problem is everytime i try that, it gets repainted with initial screen setup I have...how do i solve this..here is the code.. import com.sun.org.apache.bcel.internal.classfile.JavaClass; import java.awt.event.*; import java.awt.image.ImageObserver; import java.text.AttributedCharacterIterator; import javax.swing.*; import java.awt.*; …

0
45
Member Avatar for zyaday

i wanted an image background on a Jpanel, so I got a programm that overrides the paint function. Now i have a code that draws the image as a background and also enabled me to have some buttons on it...now i want to add more images (or animations) on my …

Member Avatar for Ezzaral
0
133
Member Avatar for knight fyre

I'm trying to create a client/server setup that allows two clients to communicate with each other. The problem is that when I run the application the the message does not go to the send client, only to the server. Here is the source code. Class MorseServer [CODE=java]import javax.swing.JTextArea; import javax.swing.JFrame; …

Member Avatar for Jishnu
0
232
Member Avatar for darklich13

I've got a small little program that I'm trying to write that converts a base10 number to a base2. For some reason my instructor wants us to use stack on this. I've got most of it done but I'm having trouble trying to get the stack converted to an int …

Member Avatar for darklich13
0
132
Member Avatar for sktr4life

this is the oracle GUI [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class OracleGUI extends JFrame implements ActionListener { // Define constants public static final String GET_QUESTION = "I will answer any question. Let me know yours.\n" + "Type your question in the following and hit Submit."; public static …

Member Avatar for sktr4life
-1
182
Member Avatar for beelzibub

[ICODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author beelzibub */ import java.awt.*; import java.awt.event.*; import javax.swing.*; class ChessBoard extends JFrame implements MouseListener, MouseMotionListener { GridLayout Board = new GridLayout(8, 8); GridChessBoard brd; int xMove, yMove, …

Member Avatar for beelzibub
0
147
Member Avatar for shobhit123

I would appreciate if anybody can explain me MVC in swings. I have heard that each compnent has respective model class but unable to relate it with MVC. Kindly explain.

Member Avatar for shobhit123
0
50
Member Avatar for C41R0

after i added in my JTextArea, everything seem mess up, their position have already run away, whats going on ? [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.awt.event.*; import javax.swing.border.*; public class MainTabbed { JLabel locationLabel; JLabel divingTypeLabel; JLabel dateLabel; JLabel maxDepthLabel; JLabel averageDepthLabel; JLabel fBuddyLabel; JLabel sBuddyLabel; JLabel …

Member Avatar for C41R0
0
306
Member Avatar for bops

Hey, I am trying to make a little MDI control with tabs, but my problems lies in the following: I want it so that when the mouse is over a tab, a close button i.e. an X is displayed on the tab, then the user may click this button to …

Member Avatar for Ezzaral
0
575
Member Avatar for beelzibub

[ICODE] ... am i right to think that the call in the main ( new Grid ...) sets up the board then the (new Che ...) calls to set up the men/pieces which it does (i hope) but it also encounters a setLayout(new Grid ...) which iverwrites all the (new …

Member Avatar for Alex Edwards
0
160
Member Avatar for dnalor

package packagePgmaLibrarySystemRolandgasparDizon; import javax.swing.SwingUtilities; import java.awt.BorderLayout; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JFrame; import java.awt.Dimension; import javax.swing.JLabel; import java.awt.Rectangle; import javax.swing.*; import java.awt.*; import javax.swing.JSlider; import java.awt.GridBagLayout; import javax.swing.border.SoftBevelBorder; import javax.swing.JScrollPane; import javax.swing.JTable; import java.awt.GridBagConstraints; import javax.swing.JButton; import javax.swing.BorderFactory; import javax.swing.border.EtchedBorder; import java.sql.*; import java.awt.event.*; import javax.swing.ImageIcon; import java.awt.SystemColor; import java.awt.Color; …

Member Avatar for masijade
0
174
Member Avatar for marcosjp

Hello! As a college assignment, I'm finishing a small applet that communicates with a MySQL database (through a Java server via RMI - all this is part of the assignment). It's doing all it should except for one thing: in one of the tabs I included a JTable that lists …

Member Avatar for jwenting
0
128
Member Avatar for chopram

Hi Guys, I am quite experienced in programming with Java. I have though come accross a small problem, I don't know how to implement the MVC pattern. I understand the concepts of the MVC pattern and I was hoping that someone on this forum could help. I have a model …

Member Avatar for jwenting
0
321
Member Avatar for beelzibub

... what i am trying to do use thr GridChessBoard clas to paint/drae an empty board then return to the program which adds the men/pieces to the board. ... i can get the empty board but it doesn't add the meb/pieces. i don't know why. i suppose i bit off …

Member Avatar for beelzibub
0
144
Member Avatar for CK01

Hi, was wondering if anyone could help me. I'm creating my own little simple tree structure, consisting of several JTextFields. Each TextField is added to a JPanel, which is finally added to a JScrollPane, which is then added to a JFrame. Everything is fine, apart from the position of the …

Member Avatar for CK01
0
102
Member Avatar for Futbol10

Please help i have added buttons but they aren't how i want them.....how do i change the letters to squares and how i want them? and at the very bottom i am confused with what to do next thanks for anyhelp import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.JOptionPane; public …

Member Avatar for Futbol10
0
111
Member Avatar for beelzibub

[ICODE]package chessbuard; import java.awt.*; import java.awt.event.*; import javax.swing.*; //import javax.swing.event.*; import javax.swing.border.Border; class ChessBoard extends JFrame implements MouseListener, MouseMotionListener { GridLayout Board = new GridLayout(8, 8); int drag1, drag2; int xMove, yMove, labelw, labelh; JLabel label; String[] manrow = {"Pawn0", "Pawn1", "Pawn2", "Pawn3", "Pawn4", "Pawn5", "Pawn6", "Pawn7"}; String[] manrowx = …

Member Avatar for PoovenM
0
164
Member Avatar for ramjeev

Hi friends, I have to fetch date, month & year from Calendar.For that I need a Calendar with User Interaction from which i can fetch. Is there any Calendar (builtin) in swing or i have to make it my own?.Pls let me know if u have any idea. with Thanks, …

Member Avatar for Ezzaral
0
65
Member Avatar for beelzibub

package chessbuard; import java.awt.*; import java.awt.event.*; import javax.swing.*; //import javax.swing.event.*; import javax.swing.border.Border; class ChessBoard extends JFrame implements MouseListener, MouseMotionListener { GridLayout Board = new GridLayout(8, 8); int drag1, drag2; int xMove, yMove, labelw, labelh; JLabel label; String[] manrow = {"Pawn0", "Pawn1", "Pawn2", "Pawn3", "Pawn4", "Pawn5", "Pawn6", "Pawn7"}; String[] manrowx = …

Member Avatar for Alex Edwards
0
149
Member Avatar for Bouras

Hey... I present myself.. Youssef, 17 years old and i'm currently on my second year of the IB Program ... Computer IB HL i took. As some of you might know our IA = Internal Assessement is a Java Database and now mine is due wednesday... [PART I] and i …

Member Avatar for sillyboy
0
250
Member Avatar for ovesh

Hello, I am a java developer (with a few years experience). I have just been assigned my first C# project. So far I have only written UI in java (Swing), coding by hand. I have found this to be easy and manageable. When I opened Visual Studio (not for the …

Member Avatar for Ramy Mahrous
0
112
Member Avatar for funtoosh

I'm implementing a Timer for different cities using GregorianCalendar class of java.I got a Null Pointer Exception in the following code in ---- target.timeElapsed(this) line.After a lot of practices,I don't got it out.Plzz help me to sort it out.. Here's my code---------- import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; …

Member Avatar for funtoosh
0
226
Member Avatar for bjeff71

I am receiving a successful build msg, but I cannot get my program to run correctly. Hereis the msg. followed by the program:[CODE]init: deps-jar: compile: run: java.lang.NoClassDefFoundError: Inventory5_5 Caused by: java.lang.ClassNotFoundException: Inventory5_5 at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) Exception in thread …

Member Avatar for Manishbpl
0
163
Member Avatar for vasu_atri

hi friends...i have to generate a front end using applets,swing and AWT...it is report generation front end...on left side i have some objects to drag on to the center..the center part contains the selected type of report...when i selects a type of report,on left side i should get the options …

0
43
Member Avatar for Bouras

sorry figured out i put my 1st post on wrong section ;s:S... put on java script.. heres a copy/paste.. Hey... I present myself.. Youssef, 17 years old and i'm currently on my second year of the IB Program ... Computer IB HL i took. As some of you might know …

Member Avatar for Ezzaral
0
119
Member Avatar for bjeff71

I am having problems with my program. I am altering it to show the GUI which should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, the value of the inventory …

Member Avatar for jwenting
0
112
Member Avatar for darklich13

Can somebody please help my try to understand how to add an equals method to my Person, Purchase, and Customer class? I am very new to Java and I can't figure out how to call the equals test from main and have it reference to the other classes. Any help …

Member Avatar for Ezzaral
0
390
Member Avatar for CelestialDog

Hi guys, i'm in the process of learning Java and so far i'm really enjoying it. However i've hit a small problem. I have two seperate classes, one class creates the swing user interface and the other handles the connection to an irc server. Here is the User interface class: …

Member Avatar for CelestialDog
0
178
Member Avatar for BabyEyes

hi , i have a program which i am stock in , its about traffic light . i did the display part but i cant do the timeing and changing the color of the traffic signal . if one signale is green there should be a timer which has time …

Member Avatar for BabyEyes
0
145
Member Avatar for dummbe

hi , i have this problem, which i cannot figure it out. This problem has been day now,and reached does not seem to help. How do u pass an integer value form one class to the other class. Here my code. The integer that summited by the user which is …

Member Avatar for orangehead911
0
285
Member Avatar for acunlai

hi guys, i need to write a program about slide show in java, please help me with these wrong code : import javax.swing.*; import java.awt.*; import java.awt.event.*; class myframe extends JWindow { myframe() { setLocation(200,200); setSize(250,150); addKeyListener(new Listen()); show(); } class Listen extends KeyAdapter { public void keyPressed(KeyEvent e){ if …

Member Avatar for jasimp
0
345
Member Avatar for TheWhite

I'm trying to add a KeyListener to my JFrame, but it doesn't seem to work when I have a JButton floating around [code=Java]import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JFrame; import javax.swing.SwingUtilities; public class Testing extends JFrame implements KeyListener{ public static void main(String[] args){ SwingUtilities.invokeLater(new Runnable() { public void run(){ new Testing(); …

Member Avatar for TheWhite
0
1K
Member Avatar for D boss

hi guys, i have created a class which has a couple of buttons and each button calls a public class, class B4 is a button and it calls up the Printdata class, the Printdata class, then gets data from the database carpark and stores it into a file.txt as B4 …

Member Avatar for D boss
0
114
Member Avatar for regent_royal

Hi, friends I want to disable copy (Ctrl + C) in JEditorPane in Java.. I used text/html as our requirment so that right click of mouse is disable but it can't effect on Ctrl+c. So, Help me.

0
64
Member Avatar for cbalu

Hi folks, Today i noticed two strange behaviour in swing. [B][I]Case 1:[/I][/B] Normally for every key events we used to get one keyPress and one keyRelease events.But this is not of the case with [B][COLOR="Red"]PrintScreen[/COLOR][/B] key. I tested this behaviour on the JNLP file used in java tutorial at this …

0
74
Member Avatar for LevelSix

Question: Write a program that draws a clock face with a time that the user enters in two text fields (one for the hours, one for the minutes). I have Followed my example code, and come up with 3 classes. Clock, which sets the outines for drawing clock objects, ClockViewerFrame …

Member Avatar for LevelSix
0
141
Member Avatar for hezfast2

I'm writing a program that takes an input string and gets the length and/or gets the number of vowels and consonants in the string. I've gotten it working except for consideration of spaces (which are allowed) and error checking for input other than letters. Here is what I've got so …

Member Avatar for hezfast2
0
111
Member Avatar for D boss

hi guys i am trying to create a button that sends all the data returned from my ms access database into the fields of my jframe to the printer for a hardcopy, i have created a button to exit the frame, but now i am having difficulties creating a print …

Member Avatar for javaAddict
0
118

The End.