32,199 Topics
| |
Hi! How could I create/delete a directory on the remote machine using FTPClient of org.apache.commons.net.ftp.*; ? The code used to save a file on the remote machine is shown below. But I would like to update it for creating/deleting directories. Thanks! [CODE] private void saveAttachedFileToRemoteMachine(String pathToFile, DefaultMutableTreeNode selectedNode) { FTPClient … | |
Hi! I would like to get an advise about the following question. There is a set of text fields. The task is to generate a new JFrame and align text fields based on the information given, i.e. a row and column of each text field. Let's say there is a … | |
hello, i'm vasant...recently visited an online tutorial for creating java desktop database application here is the URL [url]http://www.netbeans.org/kb/docs/java/gui-db.html#running-outside-IDE[/url] ... everything works fine...when building and executing the application from within the NetBeans IDE..6.7 but as instructed in that tutorial...when I tried to run the .jar file after exiting the netbeans IDE, … | |
Hello, I am having some trouble with getting my menu to respond to a mouse click.I have 2 items on my menu, "New" and "Exit", and they are using the actionlistner like so [CODE] newFromMenu = new JMenuItem("New Screen"); newFromMenu.addActionListener(this); [/CODE] and then my action event [CODE] public void actionPerformed(ActionEvent … | |
hai, friends i have problem in inserting image into mysql database using a small java program.... here is my code for inserting image into database............ [CODE] import java.io.*; import java.sql.*; class ImageUpload { public static void connection() { Connection con=null; Statement st=null; PreparedStatement pst=null; try { Class.forName("com.mysql.jdbc.Driver"); System.out.println("driver is loaded"); … | |
I am doing a inventory assignment, I think I have completed the code, but when I try to run it I get <no main classes found> I am using NetBean IDE 6.9.1 It also tells me: Created dir: C:\Users\marilyn\Documents\NetBeansProjects\ClassPublicPayroll\InventoryPart1\dist Not copying the libraries. Building jar: C:\Users\marilyn\Documents\NetBeansProjects\ClassPublicPayroll\InventoryPart1\dist\InventoryPart1.jar To run this application … | |
program is working fine on YES option but on NO option it does not return ? any one give me hint ?? this.addWindowListener(new WinAdapter(){ public void windowClosing(WindowEvent e){ String cnic1 = (String)cnic.getValue(); String name1 = name.getText(); String fname1 = fname.getText(); String age1 = (String)age.getValue(); String add1 = add.getText(); String pro1 … | |
Hey guys, I'm trying to code a testing app which will display questions on a JForm for a period of time. I need a way of keeping track of time so I know when the user's time is up. What should I use? So far, I've found these: [B]javax.swing.Timer[/B] [B]java.util.Timer … | |
i need to move[CODE]if(fright <= 45 && fright >= 35) System.out.println("Pressure is in range"); else System.out.println("Warning: Front right tire pressure is out of range"); [/CODE] to TirePressure but have it still print out right after i imput the tires pressure not after i imput them all and i cant figure … | |
For a homework assignment I need to make a stoplight cycle from red to green to yellow back to red. I tried using a thread.sleep method when I press a button to cycle through but it only goes to the last sleep & setColor statement. I know this is probably … | |
Hi! Does anybody know how to group JLabel and JTextField in order to get a single component? Thanks! | |
Okay so in class my professor was going over this code: [CODE]class BinaryTreeNode<T> { protected T element; protected BinaryTreeNode <T> left, right; BinaryTreeNode (T obj) { element = obj; left = null; right = null; } // constructor BinaryTreeNode public int numChildren() { int children = 0; if (left != … | |
I have a compilation error using bluej java. Here is the code: [CODE]while input.equals(!"q")[/CODE] This is the error I get: '(' Could you please help me thanks :) If i add to a semicolon to the end like this: [CODE] while input.equals(!"q");[/CODE] I still get the same error. | |
Hi there, I tried to to delete sorted number in each rows by reading a text file and write it to another file with a new format: such as readfile1.text contains 1, thoman 2, tom 3, jess87 4, kelly and so on.. I came up with this code and I … | |
I have been able to successfully load another java program (Calculator) within a java program with the following code: [CODE]Calculator.main(null)[/CODE] The program loads successfully but both programs have the code: [CODE]addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } } );[/CODE] So once I close the Calculator program … | |
Please any one guide me or give me some hint ... can i run my java application directly from batch file or any other way from which i can directly access GUI of application. Regards, | |
I have started my code to create an application with two combo boxes. One that holds the names of the dormitories and the other holds the meal plans. The user should select a dormitory and a meal plan, and the application should show the total charges for the semester. I … | |
I have a GUI program that controls all the graphics, etc of the program, while another program has all the calculations the GUI program grabs to show in its program. Well I would like to have another program that uses Frame and implements ActionListener, and launch that program with the … | |
Can anybody tell me why I'm not getting checkboxes? Sometimes I can get one, but never the three I need. [CODE]public class SwingLab implements ActionListener { // instance variables - this instance will get reader's name private Scanner reader;//name from user private Random random; private ArrayList<String> name;//construct a responder, declare … | |
Hi folks I know this particular program has been posted in many other forums but it all involves many different things that I have no learned yet so I really can't use any of them.....plus it would make me look stupid to turn in something that I copied that includes … | |
I'm trying to figure out how to add an element to an array of integers, but the tricky part is that I have to slide the elements to the right of it over by one place. For example: Start array: {1, 2, 3, 4, 5, 6, 7} Adding 10 to … | |
Hello, I have a Client/Server program. The Server is BlackJackServer.java. I am having the following exception when I run the program. Can anyone explain me what the error below is saying? [CODE]java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.DataOutputStream.write(DataOutputStream.java:90) at java.io.DataOutputStream.writeUTF(DataOutputStream.java:384) … | |
I'm trying to implement a chatroom using RMI and everything was fine until I tried to bring my GUI into the picture, from what I can see the RMI aspect is fine, the client is sending the info to the server, the server sends it to all clients with callback. … | |
Hello! I have a JScrollPane with JTable that is filled from MySQL. I'm using SwingWorker to display JScrollPane while reading data from MySQL database. There is no problem with it. My question is how to add a text "Loading..." to JScrollPanel? I just want to display some message in this … | |
The problem states to write a method named fallingDistance that accepts an object's falling time as an argument. The method should return the distance that the object has fallen during the time interval. Demonstrate the method by calling it in a loop that passes the values 1-10 as arguments and … | |
I have file that contains Unicode characters from Latin-1 and Latin Extended A sets (link to [URL="http://unicode.org/charts/"]Unicode charts[/URL]). How do I read it so that these unicodes are converted to proper characters? I tried [code=Java] public void readFile(File file) { try { BufferedReader in = new BufferedReader(new FileReader(file)); String noneUTF; … | |
I'm back guys! This time I'm working on this project for class. I have to make a "point of sale" thingy. I worked on it using GuiGenie. My design has four buttons, and I want to design it in such a way that when I click one of the four … | |
Hi, I am having a terrible time getting to grips with layout managers, and am hoping someone can shed some light onto my misery.My problem is this: I have created a simple GUI, that contains a button panel, a picture panel and a radio button panel.All these panels are put … | |
[B]my project in java is for blind people, basically it is a tutorial. i want some application in java which converts speech into text and text into speech, till now i dont know from where i can these applications. please suggest me in this way, i will be very thankful....[/B] | |
Hello everyone I am trying to print out a load of printables on different pages, I have made the containing class Pageable, and implemented all the methods as below, the acutal printing is done in printAllGraphs() : [CODE] PrinterJob printerJob; PageFormat pageFormat; int numberOfPages; public void printAllGraphs(){ //this.chart.print(); numberOfPages=this.dataList.size(); System.out.println("Number … |
The End.