32,204 Topics
| |
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 … | |
Hi, I was wondering if someone could help me. I am using java SWT and am trying to output a list of files and its properties to the screen. I have a file browser popping up and when i select a directory and click ok it outputs the path and … | |
[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.*; … | |
I'm trying to replace values in an array while removing extra values. This is what I have, but it doesn't seem to work and I have no idea why. I'm just challenging myself to not use any Strings in my project. This will be the last step. [CODE]/** * * … | |
Let me tell you I already got the tutorial on how to do this [url]http://db.apache.org/derby/docs/10.3/adminguide/tadminconfig814963.html[/url] But sincerely speaking I did not understood how to do any of the two methods described. Let me tell you my confusions and what I didn't understood and I am developing my project in netbeans. … | |
I have a List [CODE]List<Food> item[/CODE] , which holds the following. 'Food foodID', 'Food foodName', 'Fruit fruit' Fruit is an Object. It is being saved into the 'List<Food> item' . Now i need to create an Object of 'Fruit' , and save all the 'Fruit' elements in the 'List<Food> item' … | |
so im very new to programming, its a miracle and a half i managed to get java reinstalled after a year and a half of not using it im taking a cryptography class, the teacher wants to show us the code behind some algorithms, like des and 3des, and in … | |
HI, All I want to do is put a straight line under my 3 labels which I have loaded into a JFrame. After my JFrame has loaded I use the method `repaint()` which is supposed to call: public void paintComponent(Graphics comp) { Graphics2D comp2D = (Graphics2D)comp; comp2D.drawLine(0,60,100,60); } Which does … | |
Heya guys, I am trying to make a desktop application for my assignment. I have to design an application that will have a JTable, JTextField and Buttons. I am done the GUI part. The input that user enters into the table should get stored into the database using an "insert" … | |
I want to synchronize the data in the record store in mobile phone with mysql database. I connected them through a web service. How can i sync them. What is the way?? i looked in at syncML. Didn't found how to use it properly. Is there any other ways?? please … | |
I am trying to deploy an application that uses JOGL for 3D rendering, so it is platform dependant. If a user with 64 bit windows tries to run it with a 32 bit Java it hangs or crashes. The java installations on windows 7 seem to be varied and I … | |
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 … | |
Can JMF( java Media Framework) be used to capture video from webcam for a WEB BASED APPLICATION...... it is not a desktop application..... does Operating System allows to access webcam for a web based application | |
Hi, Basically, I'm trying to parse a string into a char for submitting into an array, this is what I have so far: [CODE]String strVariable; Char charVariable; strVariable = "Some String"; charVariable = String.ParseString(strVariable);[/CODE] The bottom lines yields an error...is this possible to do? | |
Hello, Please clarify the following for me- (1) I want to use a rolling file appender with Log4j, so that the log messages are stored into a single log file....Also I want that the log file should be passed as parameter during program runtime. (2) What all classes have to … | |
I have this code here [CODE] public void actionPerformed(ActionEvent arg0) { for (int i = 0; i <= 360; i++){ for (int z = 0; z < 9; z++){ xaxisWave1 [z][i] -= 1; if (xaxisWave1[z][360] < 0){ System.out.println("Line out"); for (int y = 0; y <= 360; y ++){ xaxisWave1[z][y] … | |
Hi Boys, I would like to ask you, how should I correctly implement entity life-cycle using hibernate filters. At this time I have got the following classes and DAOS, which I considered to be right - but they obviously aren't. Here are entities which are used in my system. [code] … | |
Hello.. I am developing a graphics application. I am playing a video in my application and when I press any key , it should stop currently playing video and should start displaying other images.Everything went well except when I press any key the video is getting stopped but the screen … | |
| |
Hi everyone, I'm working on a summer coding project with few friends from school and we have a design issue that we need some input on.(The language is Java) We have for example a 2D vector class called Vector2. It has two properties float X, and float Y. When I … | |
OK so I have to compare Java with C++ and I need to address the following topics - The following topics should be compared: - programming constructs that are in one language and not the other, differences in - programming in one language or the other should be addressed the … | |
hello every body this is part of my datastructure project//i used java lang. i have a problem in using GUI, see : [CODE]JButton button3 = new JButton("Sub Users Access: Students & Teachers"); button3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String Option2 = JOptionPane.showInputDialog(null, "\n1-Show list of bookes\n2-Search book\n3-Exit\n\nEnter a … | |
SA i ask if any one can help me in this grammar problem : Expression ::= Expression ( "&&" | "<" | "+" | "-" | "*" ) Expression | Expression "[" Expression "]" | Expression "." "length" | Expression "." Identifier "(" ( Expression ( "," Expression )* )? … | |
Hello Friends, I have 6 to 7 threads which are running parallely. Thing is I have to put Thread.Sleep() between each threads. How Can I optimize it? [CODE]else if (__selectedString.equals("Master DataInput")) { try { if (RecordStore.listRecordStores() != null) { System.out.println("IT FOUND RECORDSTORE ......"); RecordStore.deleteRecordStore("Company"); RecordStore.deleteRecordStore("Product"); RecordStore.deleteRecordStore("Model"); RecordStore.deleteRecordStore("Customer"); RecordStore.deleteRecordStore("Sales"); System.out.println("Delete All … | |
I have two JSliders that are both going to a common stateChanged Method, but I am having trouble separating them. I assumes they were somewhat like separating something in the actionPerformed method, but it doesn't seem to work. it does however go into the method, it is just the if … | |
I am thinking to use MySQL with my new Java project, it contains some code that creates database locally and store data in it. It is all fine on my machine as I have all requisites installed like MySQL server but what will happen when I give this developed software … | |
Hi! Does anybody know how to recursively read in files from a specific directory on the internet, in Java? I want to read in all the text files from this web directory: [url]http://www.cs.ucdavis.edu/~davidson/courses/170-S11/Female/[/url] I know how to read in multiple files that are in a folder on my computer, and … | |
I am new to MySQL and thinking to use MySQL for my new Java Project which creates a database on the local client machine and uses it to perform all data operations. But before proceeding with MySQL I'm in a bit of doubt that I have MySQL server installed so … | |
I have several different classes and they have graphics in them. I told java to repaint in a class class called LongitudinalWaveGraphics, but it repaints a class called ResistorCCGraphics. Why is this? Thanks for the help. if you need any codes then I can post them. | |
could someone plz help.. i'm stuck in one part where u have to access the array form the main class(random) ive juss posted the two classes i have doubt in.. the question goes soemthin like this: Q:Make a java class file for function that can do addition, then make a … |
The End.