3,978 Topics
![]() | |
Hi everyone, Just thought i would post my program im doing at the moment as im completely stuck. Basically the program takes a user input as a string, uses the tokenizer to break down. The individual strings which will be single characters will be used to draw notes on a … | |
Is there something about adding a JList to GridBagLayout that I am missing. I want to place a JList between a JLabel and a JTextArea. No matter what I do the list seems to stay in column 1. I am only using GridBagLayout in the west pane(wP) I have tried … | |
Hello there, I am having problems with this code i have written and it is a tic tac toe program. It runs and everything but it doesn't get a winner when i call the method getWinner. this method is suppose to return 'x', 'o' , or ' ' depending onwhether … | |
hi I have a problem working a project for my school assignment but I keep getting this error and I have no idea what the problem is. Can anyone tell me what is wrong with it? the erroe messeges are Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at SearchGui.showResults(SearchGui.java:46) at SearchGui.invokeSearch(SearchGui.java:76) at … | |
Hi, pple im interested to know how to put a drawn 'image', a combination of a circle and a line into another class? If i like to draw that 'image' in the void paint() method multiple times, e.g 10. How should i go about doing it? Below is a sample … | |
can any body help me to find cool topics for miniprojects in SWING like text editor or..... | |
Greetings again forum goers! I have another question abound with plenty of obvious nooble errors I'm sure. I am making a memory game(You know the old game where you turn over cards and try to match two in a row, and memorize previous locations etc. ) and this is the … | |
I'm new to swing, and was curious if anyone could point me in the right direction here. Cannot figure out how to make this repaint crap work, or if I'm supposed to be using repaint(), or what, to make this image get drawn to the background of my window. Here … | |
First, I am running on linux and when i use the java command to run a program (i.e. java foo), it just sits after it finishes. how can I get it to fully close(specifically, the program I am posting at the end of this post) Second, is there an equivalent … | |
i am trying to make a chat applet ,first problem is that it is working for only single system,i want to know how to connect it with network and second there is some problem in my code it os showing some error which i am unable to debug. so help … | |
Hi there.I have a quick question.I wrote this program to look like my own browser.It views the code of the url givven and it was suppose to be a browser too.The button explanations are as following: CODE=Shows the code of the given url VIEW=When you push it it was supposed … | |
Hi again.I was just wondering about different layouts I can use with swing and I just came accross a sample program at [url="http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html"]http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html[/url] anyways there was this example program that I just couldn't find the error.Anyhelp would be welcomed. The error it is giving is cannot find symbol variable springutilities … | |
currently using JBuilder Foundations task is to display a .gif file in JApplet from my hardrive the URL is C:\MAGIX Should the image file be located elsewhere in a specific place? import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Applet1 extends JApplet { public void init(){ Container contentPane=getContentPane(); ImageIcon icon=new … | |
Just started a Java class and the first HW assingment was issued. I have read the chapter a million times and cant figure out what the heck am I doing wrong. The assingment is supposed change Celcius temperature to Fahrenheit using a worker class. import javax.swing.*; public class ConvertTemperature { … | |
Hi everyone, I am currently trying to serialize parts of a jtextpane using the java ObjectOutputStream to write it to disk and when i am reading the object back i am using the java ObjectInputStream. When i read the api about the streams here is what they say [QUOTE] Warning: … | |
I would appreciate any help (I am very much a beginner in Java) what is this error message and also do I use init() or main() for applet? Thank you so much //JavaAirlinesApplet.java ERROR MESSAGE: /*JavaAirlinesApplet.java:8: JavaAirlinesApplet is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener public … | |
Hi I have a JTextpane where i will be adding instructions. I know this will not be large enough, but there is no further space on my interface, so I need to add either a scrollbar or scrollpane. I have tried a few attempts at this but cannot get either … | |
Hi Everyone, I'm making a Java chat application, but it freezes whenever I click "Connect." My code is attached below. Thanks. [CODE] import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; public class CinnaChat extends JFrame { JLabel lblServerIP = new JLabel("Server IP:"); JTextField serverIP = new … | |
yes, there's an area of Java I'm almost a complete novice in (so far, I'm going full steam ahead :cheesy: ). I've the following code to filter out non-numeric input from a JTextField (which is meant to contain a timeout interval in minutes, that's why). [code] private void dumpNonNumericInput(KeyEvent e) … | |
I have made this car but am wondering how I would get it to move across the screen either on load or by button click any suggestions? import java.applet.Applet; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class NewCar extends JApplet implements ActionListener, Runnable { Container con = getContentPane(); JButton moveCar … | |
Hi all, I am new to Web programming, most of the time have done GUI development in C++/MFC and played a bit with Java/Swing. I have read about DHTML and its ability to enable interactive Web applications. Before delving into DHTML programming I would like to know what are the … | |
I need any help I can get!! Below is my coding. When I run the program it just averages out all the numbers that I put in, which doesn't coincide with the homework assignment as stated right here: For this assignment, you will write a Java program that will determine … | |
Hai, i am doing project in VoIP in Java... I am using Swing for designing purpose.. so i want to design the screenings by using GUI Builders for swing.. i need ur help that what r the different GUI builders..? which one is best and simple and also where i … | |
Hai all! Could any one help in drawing the Jtable in Mongolian orientations. i.e., Rows should be trated as column and columns should be treated as rows. How to achive it.Is there any option doing so. I was not able to achive it using ComponentOrientation. [B]Name Name1 Name2[/B] Test Test1 … | |
Hi everyone, I really need some advice and guidance on the following code [code] import javax.swing.*; import java.util.*; public class PopupAuthenticator extends Authenticator { public PasswordAuthentication getPasswordAuthentication() { String username, password; String result = JOptionPane.showInputDialog( "Enter 'username,password'"); StringTokenizer st = new StringTokenizer(result, ","); username = st.nextToken(); password = st.nextToken(); return … | |
HI ive been trying to do some java program and when ive tried to run this program which, ive had 3 errors saying cannot resolve symbol for 'DrawFrame/DrawPanel' im not sure wat the issue here is, the program is as follows: import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class Drawing … | |
Ok I have done this program where there are 2 buttons, one to enter price and one to calc average, so the user enters an randome amount and click the enter price button then user can keep entering more and then click calc average button to get average, but problem … | |
With school out and summer in full swing I decided to learn C++ in order to keep myself busy. I've been playing around and learning a lot. So far I've been able to make a program that solves quadratic equations! Alas, I've encountered a problem I can't figure out for … | |
Hi All: I am new to this List. I am creating a Swing GUI based Word Processor which takes in English Text and using KeyListeners converts it into Unicode Devanagari - the Script used for writting The Hindi Language of India - which is dispalyed in a JEditorPane set to … | |
Hey to everyone out there. I am new to this and seeking assistance with a java program assignment. if anyone can help let me know. The program is completed all I have left is to produce accurate output of a students grade. Here is the code: The code is supposed … | |
Hey guys. I was told to do an assignment, to demonstrate how a high priority thread gives a low priority thread a chance to run using the sleep function. The assignment has already been submitted and already graded. The following code when compiled not only creates a ThreadSleep.class file, but … | |
I have been browsing the internet trouble-free for the past several days, but yesterday after I restarted, I could no longer access web pages through Internet Explorer. Mozilla Firefox is still working fine, but every page I attempt to visit with IE returns the standard "The page cannot be displayed" … | |
Hi everyone, I am currently trying to print a multipage JTable but the the thing is on the left hand side of the JTable does not have any grid lines and i have tried to draw a rectangle around the jTable before printing it but nothing is happening. Another thing … | |
Hello, I created a program from a book I am reading on java. The program is using swing to make a frame that shows buttons. It compiled without any error, but I ran into an error while trying to run the program. here is the code: [CODE] import javax.swing.*; public … | |
Hello Everyone..... Im very new to the forum. I actually stumbled upon it looking for answers to a computer issue and hopefully I'll meet a few friends along the way. My name is Kimmy and Im from Northeast Pa. Im 38, married for 18 years and have 3 wonderful boys … | |
Hi all... I have a JFrame, which contains a JTabbed Pane, which contains two JPanels. The problem is that when I run the program, a completely grey frame shows up, and the contents only becomes visible when I click on the border of the frame. Here is the code. Compile … | |
Hi everyone, Take a look at the following code block. [CODE] ->Class InterruptionDialog public class InterruptionDialog extends JDialog { //Fields Thread currentThread; JButton interruptionButton; //Constructor public InterruptionDialog(JFrame parent, boolean modal, Thread t) { super(parent, modal); currentThread = t; interruptionButton = new JButton("Click to interrupt"); interruptionButton.addActionListener( new ActionListener(){ public void ActionPerformed(Event … | |
So, in my applet, I need to run two threads, each using the same "communicationDriver" class: comIn, and comOut. Each has a socket connecting to port 2002 and 2001 respectively. I init my applet as such: public void init() { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { makeGUI();}}); } Then … | |
Hey I'm trying to write a program to make a simple Tic-Tac-Toe Program. I just started coding it, so this is my rough draft version, i haven't worked on lots of checks i know i need to do later. However I have a big problem I cant seem to figure … | |
Guys I wish I would have known of you a month ago! Apr 15 I contracted a very bad virus which I thought I'd gotten rid of until a week and a half ago when it seemed to reappear. Then I got it through an online radio station via MS … | |
Hi folks...I have a Class called Model which I am using to iterate through a string, tokenize it, and then access a method in my GUI class which is supposed to change the color of the borderLayout panel. I am getting this error. I have tried to make me Model … | |
Hi, I wrote this program and I was wondering if there was a way to save the picture I'm creating using the graphics class. Here's my code: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class paint extends JFrame implements ActionListener { private int pointCount = 0; private Point … | |
Hi everyone, I am doing a custom document in which i am always getting an error at the point when i want to use the java HTMLReader class. The compiler says something about an enclosing instance and i really have no idea what the compiler means. Here is the code … | |
Hi Everyone! THis is my final program :D Of course it's not done...but I just wanted some feedback...and any ideas on how to fix my GUI XD...Any help is appreciated ^^. BUt please don't copy lol XD I don't want to get accused of cheating here...if giving out this code … | |
I'm having difficulty determining the correct size of a JDesktopPane. The following code tells me that the size of the pane is 0 x 0 //Inside a JFrame JDesktopPane myDesktop = new JDesktopPane(); this.setContentPane(myDesktop); System.out.println(myDesktop.getSize()); However, after looking in the source for GridLayout.java, virtually identical code is used. //Inside GridLayout.java, … | |
ive been trying to figure this out for hours, and would appreciate any help. im clumsy with java, have only really had c++ experience and am at a bit of a loss trying to figure out GUI's, my problem goes like this..... basically i need to create different frames or … | |
hello everyone. ok i got a program (see below i know its long but just copy and paste and it will work),, my only problem is i need to include a search method (i.e. where i enter CDName and it prints out the rest of the details of the CD.) … | |
Hi everyone, I have a JTextPane with an embedded JLabel and i am trying to print the contents of the JTextPane. When i print it an exception gets thrown saying that there is an error in the views. This only happens if i have an embedded jcomponent in the jTextPane … | |
Thanks for taking the time. I'm a beginner and I ran into a roadblock with the following code. The assignment is to create a class Complex to add and subtract complex numbers and a Class to test it. Unfortunately, I can't get it to compile so I can debug it. … | |
soz bout all this posting :S i know this is a really n00b question but how do i add a black background to this prog? import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CMP extends JFrame { public void myframe() { JFrame frm = new JFrame(); frm.setBounds(0,0,800,400); frm.setVisible(true); frm.addWindowListener(new WindowAdapter() … |
The End.