3,978 Topics
![]() | |
hey there.. i m a begineer in this java.. i m developing a simple database program to keep records of patients for a small organization in netbeans 7.0 beta. i havn't developed the whole software.. when i test, it doesn't gives errors at first.. when i press the add record … | |
i don't know what happened, but i was running an applet that i made on a webpage and it works fine. i have the latest JRE and i am running firefox 4. then i've made some changes to the applet, tested it, it works, and copy and paste the class … | |
Just a heads-up guys. I had JRE update 26 pushed onto client machines yesterday and it broke an important client-server app. This point release changes the serialVersionUID for ImageIcon. The app in question sends images from the server to the cients via a simple writeObject/readObject, which fails at the client … | |
I used JFormDesigner to create a GUI, and now I need to find out how I can export it so that it's a use-able program with just one click. Here's the code (not sure if you'll need it): [code]import java.awt.*; import java.awt.event.*; import javax.swing.*; /* * Created by JFormDesigner on … | |
I have the code given to me by my classm8 which tells the largest , 2nd largest , 3rd largest and smallest number. but I can't understand how his code works.Can someone explain this to me? [CODE]import javax.swing.JOptionPane; import javax.swing.JDialog; public class exer1 { public static void main(String args[]) { … | |
Hello, We are trying to develop a chat client program in a computer science class, but we are running into this error [QUOTE]Invalid reference in inner class to a non-final local variable [/QUOTE]. The chat client will send the users' text to a text file and then read depending on … | |
What I need is to have the same GUI stay, but when the person goes to the menu and selects Editors > NPCSpawner, I need it to change from the default interface that's there (NPCSpawner interface) to the Other GUI (yes, it's called "Other"): [CODE]import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import java.awt.*; … | |
I have a menu that I made, and the first time you select a program prom the menubar and click the launch button it launches the program, however when you select a different program, or to to the menu and reselect the same program then click launch it opens 2 … | |
Hey guys for some reason my code displays in the applet viewer in jgrasp and in eclipse, but for some reason it wont display via an html file in any browser. Any Ideas? Thanks in advance. [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; public class FamilyTreeTabbedPane extends JApplet implements … | |
Hello All, I am fairly new to Java programming (only a couple of months) and completely new to graphics in Java (couple days). Below is the relevent paintComonent function I wrote. Basically it draws a circuit based on a few member variables. This part works fine. The problem I am … | |
Hiii All :D How are you doing ? i'm such a beginner in Java ! however , i made this code i don't know how much professional is it but , I need to use Jfream when I deal with user and Jframe to print wherever I'm using JTable ! … | |
I read some of the threads on calculators, but couldn't find anything related with what I need. We have this swing calculator project, that uses buttons and/or a textbox for input, and a different textbox for output. I have done most of it, and is working ok. The problem I … | |
I'm receiving the following errors when trying to read from a file: java.io.FileNotFoundException: rates.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.util.Scanner.<init>(Scanner.java:636) at MortgageCalculator4.submitButtonActionPerformed(MortgageCalculator4.java:187) at MortgageCalculator4.access$000(MortgageCalculator4.java:20) at MortgageCalculator4$1.actionPerformed(MortgageCalculator4.java:70) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) … | |
hey there again, I am trying to build a small mechanism that lets me store product names and prices on a produktet.txt file. the file should hold lines as follows: product1 price1 product2 price2 . . productN priceN So, I built a small panel with three rows and one column. … | |
i have created a war file and save it in tomcat/webapps folder.this war file contains the code of the server that will read xml file and return it as table in a Jframe.i coded it in java and it is a web service where i create a war file after … | |
i hope you can modify my simple bouncing ball :( its flickering.... i dont know how to solve it. [CODE]import javax.swing.*; // For JPanel, etc. import java.awt.*; // For Graphics, etc. import java.awt.event.*; import java.awt.geom.*; // For Ellipse2D, etc. //import java.util.*; import java.io.*; import java.util.Random; public class aball extends JFrame … ![]() | |
Hello, forum. My question is: how can I format my output when outputting in JTextArea. I want to have the same functionality as System.out.format has (custom spaces between values). Maybe it is possible to print PrintSream objects in JTextArea? I am currently using append(String s) method but I am not … | |
[CODE]import java.io.File; import java.io.IOException; import java.io.FileOutputStream; import java.io.FileNotFoundException; import java.awt.TextArea; import java.awt.Font; import java.awt.Color; import java.awt.Image; import java.awt.Toolkit; import java.awt.Canvas; import java.awt.Graphics; import java.awt.FileDialog; import java.awt.event.*; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import javax.print.DocFlavor.URL; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JTextField; import javax.swing.Timer; import javax.swing.event.MouseInputAdapter; import javax.swing.*; … | |
Hello, I am vegaseat, the goofy moderator from the Python forum of DaniWeb. I wanted to know if anyone in the Java forum has played around with Java based Python, also known as Jython. Jython uses easy to learn Python syntax and can use the Java libraries. To make a … | |
Hello guys, I am pretty new at (good) programming, so I had some pretty bad code I was using until I ran across some code and decided to model my code after it. I have the code so it has no errors, but when I run it (NetBeans) it doesn't … | |
Hello all, I have a window with a JList inside it. I would like each line in the JList to show up in a certain font. But when I try the 'setFont(font)' method where 'font' has already been defined it say that it cannot find the symbol 'setFont(java.awt.Font)'. Here is … | |
I WAS WONDERING IF SOMEONE COULD HELP ME MOVE THE JTextField above all my buttons like a normal calculator. Also, after this I don't know how to connect the basic calculations to operation buttons. When the user clicks a button the text appears in the textfield but I don't know … | |
[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class Absolute extends JFrame implements ActionListener //Error: Absolute is not abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener { public JTextField textField1,textField2,textField3; public JLabel label1; String Operatn[] = {"Add","Mult","Divide","Sub"}; //Constructor public Absolute() { JFrame frame = new JFrame(); frame.setLayout(null); JLabel label1 = new JLabel … | |
hi every body I have a problem I want to use the value in a table in other table I mean set the value from other table to the table I want can any one help me!!! | |
How would I go about using swing components and graphics in the same program. Whenever I seem to add a swing component my graphics disappear. Please help. Thanks. My main Class [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ResistorColorCodeProgram implements MouseMotionListener, MouseListener, KeyListener{ public ResistorColorCodeProgram (){ JFrame resistorCCFrame … | |
I seem to have a problem refreshing the data within my JTable. I know the code is being run through. I have a JTable which is populated from a selection in a combo box, on first click within the combo box the table displays the correct data. So basically the … | |
Dear all I am making a program which adds lots of jlabels to a frame (the idea, eventually, is that each jlabel will link to a different program on my dekstop) The trimmed down code below shows that I have a script which creates an array of multiple jlabels which … | |
Hi I need help creating a word count file, the file should print the name and number of times the words were counted in a file. I need to use the JFileChooser and the results should be printed in the resultArea of the JTextfield. example: and 33 use 24 Here … | |
I'm trying to program the traditional minesweeper game. I have problems with Swing as I'm not sure how to proceed. I tried adding one JPanel to a JFrame and then using JButtons to imitate the tile buttons. Then I encountered a problem when I tried to program the functionality of … | |
I once upon a time had problems with buttons and getting windows to show up, now cannot get output of loan data into JList, code is below, any suggestions? next change is to add array (which I think I can do) and graphics in the form of a graph but … | |
Hi, I have developed a Java swing based application to work in Windows 7 platform. But the application is having some issues as below : 1. I have a few tabs labeled like A , B , C ,D side by side in my application. If I am using jre5 … | |
[CODE=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt1, prompt2; JButton yesButton, noButton; int section, seats[], smoking; int nonsmoking, people; public void init() { input = new JTextField( 4 ); input.addActionListener( this ); prompt1 = new JLabel( "Please type 1 for … | |
OK I have yet another homework problem. Again, help me by teaching, not writing my code for me. I have looked through the pages of threads on collision detection and found nothing to answer my question. My issue is that I have a collision detection method that should (in theory) … | |
Hello, Im trying to write a program which is computing surface area of a 3D geometry by using Newell Methods. Geometry data should be reading from a text file. The lines which has 3 columns point out coordinates of geometry's vertices. The lines which has 2 columns point out connectivities … | |
Hey guys, Here's my problem: I developed some code that converts binary to characters and characters to binary. At first all went well (by first I mean on the good ol' console), but when i tried implementing a GUI, some weird stuff came up. When I try converting characters (strings … | |
Hello, I am having a problem putting this Array's output in a single GUI window. When I receive the output it just shows the grades in individual GUI windows (IE Erik 98 [OK], Fred 76 [OK], etc). If I put the output outside the loop then it doesn't recognize grade[i]. … | |
Hi guys, I am in desperate need of help. I'm not exactly sure how to fix this or how to pass contentpanes correctly. Here is my code for gameboard.java: [CODE]import javax.swing.*; public class GameBoard implements ActionListener { private int[][] winSlots = new int[][] { {0, 1, 2}, {3, 4, 5}, … | |
hi everyone where did i go wrong with the {} please help. import javax.swing.JFrame; // import JFrame class import javax.swing.JLabel; // import JLabel class import javax.swing.JPanel; // import JPanel class import java.awt.Font; // import awt Font class import javax.swing.border.Border; // import Border interface import javax.swing.BorderFactory; // import BorderFactory class import … | |
hello everyone! i need to create setup for my java swing desktop application. I have searched in google and found a software to create a setup file. it is called INNO SETUP. But i tried to use it and but no any succeess. please help me in this regard. please … | |
I have this part of my code. I have a JLabel and a JButton that are in a panel. The I place that panel into another panel that has a border layout and I set the panel containing the label and button to be "NORTH", but the JLabel does not … | |
hi I'm writing a small game and need to pass an image into an ArrayList. The Image and bounds are set in Attacker Class with an ArrayList partially constructed in my GameScrn Class posted below. Have spent 2 days on this one issue and failing badly...guessing as usual, im missing … | |
Hello, I am new to java. I want to display the database records in JComboBox. I have 2 combo boxes. say color and object,whenever i'll select any color from combo box, next combo box should display the objects of that color. I have write one code for it, I use … | |
Hey; I am following CoreJava and came to Event Handling chapter. I am trying to show a popup menu when the red button is clicked, but not works. Background color changes but no popup menu is shown. What is the problem? [CODE]/* * To change this template, choose Tools | … | |
Hi everyone, I've been working on this for a couple of days now. I need to make sure that an error message is given if txtname has a numerical value in it, and I also need to make sure that an error message is given if txtscore has a non-numerical … | |
hey i am new here i am working on a school project where i am building an applet.. i have encountered a problem i cant solve, i have 2 classes... the first class i very simple it has to methods which return an string array for table column and Object … | |
Alright, I have the bad practice of not commenting my code very often when I write it so I'm going to try to explain what the problem is as clearly as possible. In this program I have to set up a battleship like grid of buttons. In order to determine … | |
So im setting up this gui, but im getting this Nullpointer exception: [CODE]Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at addressbook.dnDisplay.jButton1ActionPerformed(dnDisplay.java:222) at addressbook.dnDisplay.access$600(dnDisplay.java:22) at addressbook.dnDisplay$7.actionPerformed(dnDisplay.java:128) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6289) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6054) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4652) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4482) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at … | |
hi! i found problem in using timers.... do anyone help me in this regard as i have no idea about it...... please.... i am sending a code which i tried but in vain. i know where the problem arises.... but cannot find any solution of solving the problem..... [CODE] package … | |
Hi guys, Im trying to write a program that find the biggest rectangle by its area. I've tried and it doesnt seem to compile. Can you help me please, thanks. [CODE] public class Rectangle { private int width; private int height; public Rectangle(int width, int height) { this.width = width; … | |
![]() | Hi all, I recently made a web crawler as part of a Uni team project building a small search engine. I've managed to incorporate it into our GUI, there is a button which starts the crawling process by creating the crawler in a thread. (I did this because otherwise the … |
The End.