3,978 Topics
![]() | |
Hi, I'm new here. I'm kinda behind on my school work due to me going into labor early. So, I'm doing an assignment and the next thing I have to do is 'call the generate method and display the numbers for all four games,' and I'm stuck. Also I keep … | |
/* <applet code="Assign2.class" width=350 height=350> </applet> */ import java.awt.event.*; import javax.swing.*; import java.awt.*; public class Assign2 extends JApplet { private JButton buttons[]=new JButton[5]; private String labels[]= {"Footwear","Kitchen Goods","Stationery","Music","Ladies Wear"}; private JPanel thePanel; private JMenu editMenu,optionsMenu; public JMenuItem items[]=new JMenuItem[5]; private JRadioButton options[]= new JRadioButton[3]; private JMenuBar menubar; private Color colors[]= … | |
here is the code.... below is my problem............. /* <applet code="Assign2.class" width=350 height=350> </applet> */ import java.awt.event.*; import javax.swing.*; import java.awt.*; /* Class Name - Assign2 PRIVATE FEATURES private JButton buttons[] // array to store buttons private String labels[] // array to stoer the department name private JPanel thePanel; // … ![]() | |
Hi there... I'm pretty new to java, just learning arrays now. I've written a program that deals a "poker hand" to 4 players, using methods, but the problem with that is sometimes the same card gets dealt more than once. I'm now trying to use a boolean array of size … | |
hi, When you are using the Jprogressbar the % completed is usually printed in the middle of the bar. Can you change it to be printed at the end of the completed % . is there a method for that??? can anyone help me with this please..............:(( | |
how do i "hide sheet and hide window" like in spreadsheet.please help me in java swing code...a.s.a.p.thanx:pretty: | |
I need some help about ,how to naviagte from one form to another on a button click using java swing:-/ | |
I have to create a program for class and I am stuck. Basically, the problem is that we need the manager to enter in the number of pizza toppings on hand at the beginning of the day. Then, when a customer orders a pizza with toppings (ie. small pizza with … | |
I have a project that I am doing, but I cannot get my final answer to go into the text field that I want, it keeps coming out in a new terminal window. What did I do wrong?? import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JPanel; … | |
Hi everyone. I just started learning Java and did a few application to familiarize myself with it. I wrote an application to output a 2D array table but i can't seem to do it in an applet. Can anyone guide me along here? Problem is when i tried to output … | |
Hey, this isn't an, "I have an error" post! It's more like I'm taking a basic java course in High School and want to include an image as a background in a project in swing. I found some code online that seems to do this quite well, but I need … | |
HI, I am having some trouble with my assignment. I have created the gui and i am now writing the event handling. My problem is with the arrays. I have 3 seperate arrays all the same length.1 is a string and the other two are ints. in each array the … | |
import java.awt.*; import java.awt.event.*; import java.swing.*; import java.util.*; public class Main extends JFrame implements ActionListener { private DefaultListModel mod1=new DefaultListModel(), private DefaultListModel mod2=new DefaultListModel(); private JList 11 = new JList(mod1), private JList 12 = new JList(mod2); private JButton to=new JButton(">>"), delete=new JButton("<<"), ord=new JButton("order"); private JLabel costLabel=new JLabel("Total Cost: $0"); … | |
I have an application that I want to create my own dialog screens. For example, the user cliks on one frame, and I want to open a window for the user to enter data, after the user finishes, he presses OK and then the main app continues. On the class … | |
I wrote a program in java that takes a message entered in the shell and flashes the message, then click the quit button to quit. Now I am supposed to rewrite it in python. So far in TKinter I only have the actual quit button (gui). I have no idea … | |
Can someone help me rewrite this java program in python. This program takes a message from the shell and flashes the message one word at a time. Now I am supposed to rewrite it in python (tkinter), I have the gui done and my quit button works, but I cannot … | |
Hi Im working in an application which will track the click made in any web based application. For Eg: If u click on a link "mail" in yahoo.com.. this application should be able to detect the link clicked. silmilarly for other radio buttons, check boxes.. etc. can someone tell me … | |
Help me pls. I have some problems with method getClient(), bring only two classes. [code] package drugstore; public class DrugstoreFrame extends JFrame { Client person; ... public Client getClient(){ person.setAccount(getField(jTextField4)); person.setPassword(getField(jPasswordField2)); person.setFio(getField(jTextField5)); person.setAddress(getField(jTextField6)); person.setTelephone(getField(jTextField3)); person.setAdditionalInformation(getField(jTextField7)); return person; } private String getField(JTextField field){ return field.getText(); } public void jButton10_mouseClicked(MouseEvent e) { … | |
Hi Im am so far trying to get the Jlist in my gui to display all the files in my directory H:\SDI\MileStoneMyworkspace\MileStoneMyWorkSpace\users\abimar How can I do this. If you look I madde an attempt, tried to write files to object and list objects in J list. What am I doing … | |
ListFile class takes care of writing the files to Jlist Basically there is a Jlist in my GUI and I want it to display the files stored in my user folder. But for some reason it doesnt work the Jlist say that there is Null file. [code = java] package … | |
Hi there. I'm trying to write some code to display a graph with nodes/edges on a LayeredPane that will allow the user to move the nodes around. However, I am having some problems getting my nodes to show up. Whenever I launch the application, I just get a blank window. … | |
Hi, i've got a component that displays two JSpinners with a JOptionPane but the JSpinners are stretched across the dialog window. Does anyone know how i can format the JSpinners so they're smaller? Here's some of the code [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; public class TComponent … | |
Hi, can some one please help me run this code. i have another class named Course, that complied without error. Now in this code i am trying to take user inputs to find resulting gpa in a course. the following code does not compile, please help. [code] import java.util.*; import … | |
In my JApplet, I am able to change the background color of the panel but not the currentSurface which is an instance of PaintSurface extends JComponent. Could someone please help me out? Many thanks [code] import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.awt.geom.*; public class Tanks extends JApplet … | |
Hello! Please help me! I display the data from the arrylist xx in the table. But the program shows the table several times. I did not notice that before. Now whenever I click the menu, it shows the table 26 times. What is the problem? I am in trouble. Please … | |
Hey everyone. I have a problem. I can't find why my code won't convert Fehrenheit to Celsius. :sad: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CTemp extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { CTemp frame = new CTemp(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); … | |
I can't find this typing error. Somewhere on Line 44. [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Weight extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { Weight frame = new Weight(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); } private void createGUI() { setDefaultCloseOperation(EXIT_ON_CLOSE); Container window … | |
I get a tip of $8.0 when I want $8.4. What am I missing here? [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Tip extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { Tip frame = new Tip(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); } private void … | |
i'm currently in the middle of a Java programming assignment, and having quite a spot of bother! for some reason, when i run my code (which has no visible errors), a small window appears with the words Swing Example in blue italics. anyone got any idea what coud be causing … | |
i don't know how to add buttons to the code , it already has two buttons on it but i don't know how to add more...i just editted this one i've tried adding one more but it just won't work..it still does two things.. here's the code if you can … | |
I'm working on a program that opens an html text file using a JEditorPane. I can read in the html file but i can't get the hyperlinks to work. I want it so that when the user clicks on a hyperlink word, it will open a different html file in … | |
I'm trying to display text on GlassPane in front of image which I read in. There is no problem with image which does display but my text doesn't appear. What is wrong???? [code] import java.io.File; import java.io.IOException; import java.awt.*; import java.awt.image.RenderedImage; import javax.swing.*; import javax.media.jai.widget.ScrollingImagePanel; import javax.media.jai.NullOpImage; import javax.media.jai.OpImage; import … | |
Hai friends iam doing project in swing ,in my project i want to send email while running my project.. i added the following code for email: [B]String host = "mail.gitech.in"; String from = "[/B][EMAIL="from@mail.com"][B]from@mail.com[/B][/EMAIL][B]" String to = "[/B][EMAIL="tomail@gitech.in"][B]tomail@gitech.in[/B][/EMAIL][B]"; // Get system properties try { Properties props = System.getProperties();[/B] [B] // … | |
This is my code, I could get the program to run before i tried to get it to display using a GUI interface; can anyone help please? //Inventory Program Part5 import java.util.*; //=============================import all java.util classes import java.text.*; import javax.swing.*; class Product //============================================start Product class { public String[] className; //=====================================class's … | |
hey guys., Help me out.. I am doing some project using java swing..in that i get stuck up with one problem in combo box... I am having 5 items in the combo box([B][U]Contains same item names[/U][/B]) for ex: abc abc abc abc abc when i select any one of these … | |
Hi, I am writing a little GUI application and I want to set them up, so that they have a Windows look and feel. So far I can't seem to find anything workable. | |
hi, i dont know how to disable the maximise and minimise button in title bar.....so please give me the idea for that......... regards, vani | |
Hey buddies.., I m developing some project using java swing... in that I got a problem like......if i use timer thread in label means i couldnt perform any other action in that panel like button click event and all.... it becomes too slow in action.... | |
Hi this is my first post here:cheesy:. I'm having a problem with how to throw exception in an applet and how to[B] add [/B]actionPerformed to other buttons. This applet calculates the sqare roots of an equation. It calculates the stuf ok but the thing is that I want to throw … ![]() | |
this the my first assignment given by my lecturer. i've tried to do it and manage to compile..but the problem is i got confused on how this program execute? is it line by line like c++? can someone show me the sequence on how my program being executed and maybe … | |
hi, anybody can teach me how to code user interface in swings using ftp protocol? awaiting for ur reply java buddy | |
Hello guys, I am trying to design a Task handling tool. In the Right hand side, a panel which contains (columns and rows) as : Week/Time Monday Tuesday Wed ... 10:00 AM x 11:00 AM What i want to do here is, try to make a right click on the … ![]() | |
I'm learning Java right now, and one of the projects I've been working on as practice lately is just a simple text editor (using Swing). The one thing, though, that I can't for the life of me figure out, is how to add scroll bars to the text box if … ![]() | |
Hello again, I've been trying this coding for weeks now and have no idea where the bug is.... Could someone help me? :mrgreen: import javax.swing.joptionpane; public class homework7{ public static void main(string args[]){ //prompt user to insert a value of signal array String getsizearraystring = Joptionpane.showinputdialog(null, "enter a value for … | |
Someone Please help me, I've no idea y it doesn't work?? :confused: import javax.swing.JOptionPane; //Program uses JOptionPane public class Homework5 { //Main method to begin Java application public static void main (String args[]) { int NumberWord1 = 0; int NumberWord2 = 0; //User Enter's the 1st word String Word1 = … | |
import java.io.*; import java.awt.Frame; import java.awt.FlowLayout; import java.awt.Color; import java.awt.Insets; import java.awt.Dimension; import java.awt.event.WindowListener; import java.awt.event.WindowEvent; import java.util.Enumeration; import javax.comm.CommPort; import javax.comm.CommPortIdentifier; import javax.comm.SerialPort; import javax.comm.NoSuchPortException; import javax.comm.PortInUseException; public class BlackBox extends Frame implements WindowListener { static int portNum = 0, panelNum = 0, rcvDelay = 0; static SerialPortDisplay[] portDisp; … | |
Dear all, i am having a JTable, in which a column of each row is having a checkbox field. If the checkbox is checked then and then i should be able to modify the cells in that row, ...where the checkbox is. I have created the table with AbstractTableModel of … | |
Hello there! I'm new here, like to say hello to you all. I'll probably be needing help on plenty more themes soon as I'm looking to continue this subject alone when the Semester finishes. I'm studying Java and just can't get my head around Multithreading. Wonder if anyone could help … | |
guys, i am making a program in java. i have to use a sorting agoritm. i manage to get some from the internet but it seems that they are too technical and hard to understand and i dont know where to put them and how to use them. here is … |
The End.