3,978 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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 … | |
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) … | |
// 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 { /** * … | |
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 … | |
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 … | |
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 … | |
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.*; … | |
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 … | |
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; … | |
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 … | |
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 … | |
[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, … | |
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. | |
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 … | |
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 … | |
[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 … | |
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; … | |
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 … | |
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 … | |
... 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 … | |
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 … | |
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 … | |
[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 = … | |
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, … | |
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 = … | |
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 … | |
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 … | |
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.*; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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(); … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … |
The End.