32,204 Topics
| |
[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.util.*; public class Cinema extends JFrame { private JLabel lblName,lblIC, lblPN, lblPerson, lblTicket, lblTP; private JTextField txtName, txtIC, txtPN, txtPerson, txtTicket, txtTP; private JRadioButton rbA, rbB, rbC, rbD, rbE, rbF; private ButtonGroup radioGroup; private JCheckBox cbxA1, cbxA2, cbxA3, cbxA4, cbxA5, cbxA6, … | |
EDIT: My problem was solved. :) But I have a doubt, what is the most effective way to wait for something to happen in java? for example, if I want to wait for a boolean b to be true, does this below work? [CODE=java]while(!b) {} //stuff to do after wait … | |
hello everyone i want to know how i can store the image in my database(PostGreSql pgadmin iii) using jsp and glassfish as a server. i have the following code but it go to exception at pst.setBytes(2,b)....... thnx [code] con = getConnection(); String exsistingFileName= "C:\\temp\\myimage.gif"; File file = new File(exsistingFileName); FileInputStream … | |
Hi All, I want to run a POJO within an EAR externally. I know this can be done from a servelet, but I'd prefer being able to do it from command line. Is this possible? Are there other options? Thanks! | |
hi, can u help me.when i click at the checkbox,the data in the checkbox should appear in the number ofperson textbox..but i cannot pass the data to the textbox.any solution...thanx in advance..here's the codes: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.util.*; public class Cinema extends JFrame implements … | |
Hi everyone, I'm using jasper reports & i want to display total number of record/rows on jreport. please help me. thanks in advance !!! | |
I have the following error on line 71 and I'm not sure whats wrong with that statment any explanation would be greatly appreciated. C:\Users\peter\Desktop\CSC 111\welch_lab4\welch_lab4.java:71: cannot find symbol symbol : method equalsIgnorCase(java.lang.String) location: class java.lang.String while (!(response.equalsIgnorCase(FLAG))) ^ 1 error Tool completed with exit code 1 This is the details … | |
Hi, I want to build new Gui program for calculator. I did it in c# using MS visual c# 20100 express. Now I want to do it in java. I used jGRASP till now. Does jGRASP has any feature like visual studio to add buttons or something like that? or … | |
Hello everyone. I want to change the background color of the button when I click it. the problem now is the only the last button works, but not the way I want to.(It changes color I click other buttons.) here is my button code. [CODE] for (int i=0; i<(5; i++) … | |
Hi. I am trying to display a JFrame containing a JLabel with an image, and I can't get the image to display. The text appears fine. I've done this before with no problem, so I have no idea what is wrong. I've tried everything I can think of to fix … | |
Hi, sorry my title isn't very explanatory. What I need to do is to access a variable from a main function, in another function without using a parameter to do so. Based on the nature of the problem you might see why I would do this. (if there is a … | |
Hi to all! I'm glab to be here and...I'm here because I need some help! ^^; Hope someone can give me an hand... I'm trying to study java using some books for beginners...and I gest stucked in an excercise... I've this: [CODE]class LogicalOpTable { public static void main(String args[]) { … | |
Hi! I'm getting this error that says that I need another '}'... The problem is that I have all of the needed ones The error report is: "Syntax error, insert "}" to complete ClassBody" | |
This is problem of optimization. I want to create bipartite graph with weighted edge.. So i have created program. Please tell me how can i add weight to each of its edges and then from this i can calculate min. objective function. Please reply. [CODE]import java.io.*; class bip { BufferedReader … | |
This is my GUI diagram book --> reservation --> payment [LIST] [*]I need to know what should i add if i wan to take total value from "book" class to use at "payment" class. help me TQ [/LIST] [CODE]public book () { double price = 12.00;[/CODE] Im using passing value … | |
[CODE]import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class addition { InputStreamReader ins=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(ins); int a,b,c; public addition() { int a=Integer.parseInt(br.readLine()); int b=Integer.parseInt(br.readLine()); System.out.println("a="+a); System.out.println("b="+b); c=a+b; System.out.println("c="+c); } public static void main(String args[]) { addition a =new addition(); } } [/CODE] | |
i managed to encrypt a password in wampserver but i also want to implement the same code in the login frame code so it can also encrypt what i have type so it became easy to be compared with the encryption in database, how to i embedd the code in … | |
Level 2 Version B - Level 2 above plus Use of classes and objects to store and manipulate the item data Example • Write a new class ‘Event’ to represent details of sports event objects. A sports event consists of (for example) the event title, year and venue (“Olympic … | |
TEX] I have this code but can not get it to display the numbers the way i want. I want the display 1 21 . . . n-2)......1 (n-1).......1 n (n-1)... 21 My code is[/TEX] [CODE]public class print{ public static void parttens() { int w=4,t=0; int k = 1; int[]array=new … | |
How do I split a string by 2 characters? lets say I am parsing a html page, and you have lots of tags such as <html> <title> blah bahl </html> If I wanted to split by <title></title>, how would I do that? my goal, is to get the strings within … | |
i have to create a soccer tournament like the world cup that starts off with 32 teams that goes down to 16 then quaters, semis and final i have to use sort stacks or queues or even linkedlist. there must also be arrays, classes. gui for bonus marks but i … | |
How to pass radio button's value to another frame i only know how to pass label and textfield value but not radiobutton. is there anyway to take the value from radiobutton to another frame? this is the code of mine how to pass label and textfield [CODE]public void actionPerformed(ActionEvent e){ … | |
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at DatabaseTwo.manufacturerSearch(DatabaseTwo.java:81) at SearchManufacturerScreen.searchForManufacturer(SearchManufacturerScreen.java:241) at SearchManufacturerScreen.actionPerformed(SearchManufacturerScreen.java:192) 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:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at … | |
I dont know what the problem...seems the button didnt work at all..~ help me find the problem plss... [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class listOfMovies extends JFrame implements ActionListener { private JLabel jlbWelcome, jlbPick; private JButton jbtBatman, jbtAngels, jbtDue, jbtFaster, jbtFour, jbtHuman, jbtWarrior, jbtWater, jbtHarry; public listOfMovies () … | |
I've been working on this for quite a while. Everything works except for writing and reading my Vector<Question> questionList to and from my binary file. The file is created as it should be and the rest of the program works ok, but I'm not sure what I'm doing wrong with … | |
Hello.. I made a java chat application which transfers files from between server and client. The thing is that i used sleep() method to make the progressbar go slow. I want the progress bar to progress according to the progress of work done.. I dont know about EventQueue ... Any … | |
:confused:If there [COLOR="Red"]exists a [B]class [I]lock[/I][/B][/COLOR] and [COLOR="Green"]from this class [I]different [B]thread objects[/B] or [U]different [B]objects[/B] & there corresponding [B]threads[/B][/U][/I] are created[/COLOR], may they [B][I]run[/I] simultaneously[/B]?:?: e.g. [ICODE]public class Smiley extends Thread { public void run() { while(true) { try { synchronized(Smiley.class) { System.out.print(":"); sleep(100); System.out.print("-"); sleep(100); System.out.print(")"); sleep(100); } … | |
hai friends, Am developing java project with client server interaction, am getting the Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space Exception, i doknow how to solve this ,please help me in this. | |
Hey i have a project that i have put the Questation at the end of this message i am a newbie to java and have make this my mainly Questation how do i put somethin in my arrays from GUI ?? and how do i search in name or id … | |
There are errors in lines : [B]9,14,28,47,,49,38 & 66[/B] please can u give me solutions to these and thank for reading this. [CODE]CdRecord[] arrayrecord=new CdRecord[5]; int counter = 0; int result; CdRecord one = new CdRecord(); menu_choice=Integer.parseInt(JOptionPane.showInputDialog("Enter 1 to create cd" + "\nEnter 2 to print" + "\nEnter 3 to … |
The End.