Click here to Skip to main content
Page 1 of 4
Page Size: 10 · 25 · 50


Tag filtered by:  Swing [x]
Answer 10 May 2013   license: CPOL
Use this code, I have written it myself and it works:import java.awt.BorderLayout;import java.util.ArrayList;import javax.swing.BoxLayout;import javax.swing.JCheckBox;import javax.swing.JComboBox;import javax.swing.JFrame;import javax.swing.JPanel;import...
Answer 8 May 2013   license: CPOL
Hi Kapilk,Just use an array. You read the number of of columns from the combobox and then create an array of JCheckBox:int numberCheckBox = ...JCheckBox[] checkBoxList = new JCheckBox[numberCheckBox];for(int i = 0; i
Question 8 May 2013   license: CPOL
how can i create jcheckboxes dynamically;i am getting table name in a comboBox and i want to add as many checkboxes as the number of columns the selected table have.pls help me out;
Answer 4 May 2013   license: CPOL
As a minor advice. Why have you initialized your text fields with so many space characters? If you want the text fields to be empty, the just initialize them like this: JTextField myTextField=new JTextField("");Thus the compiler knows that text fields must be empty. And by...
Article 4 May 2013   license: CPOL
Swing Events with Annotations for Swing components.
Answer 29 Apr 2013   license: CPOL
There are many things that can make a process, not just a UI component, unresponsive. The solution depends upon what is causing the problem. This is a classic case of needing to analyse and debug.First thing to do is see if you can reproduce the problem. From your post it sounds like this...
Question 28 Apr 2013   license: CPOL
I made a Download Manager using Java Swing. The GUI becomes unresponsive after a while. Every download is implemented as a new thread. Only the GUI updates are run on the Event Dispatch Thread. How can I improve GUI performance of a swing program, in general. Also are there any good tools to...
Answer 22 Apr 2013   license: CPOL
Well i can't give you a full advice on how to work with your files, but as for the 2 vertical frame, i would rather use one frame. I would create a panel in it. To this panel i would give a GridLayout(1,2) (1 row, 2 columns ) and then add two more panels ( internal panels if your prefer...
Question 21 Apr 2013   license: CPOL
hi...i am new to java...now i need to design 1 frame with 2 vertical frames,in the first frame i should put 1 label followed by drop down list..next again a label with text boxwhere user can enter text.in the 2nd frame i should import files from a folder and select...there should be...
Answer 15 Apr 2013   license: CPOL
The strings returned by getText() contain trailing spaces which parseInt() objects to. Change your code to something like:String stemp = t1.getText().trim();int a=Integer.parseInt(stemp);Also put the validations for all the getText() methods, meaning proceed further only if the...
Question 13 Apr 2013   license: CPOL
Before i ask this question i have been working to find the conversions from swing and AWT in java to android I made an application about remote access that works fine on the computer and while rewriting it on the ADT i figured out some problems in my code that uses the java GUI like swing and...
Article 21 Mar 2013   license: CPOL
Animated sliding panel in Swing.
Question 6 Mar 2013   license: CPOL
1) how to add simple node (without check box control) in Jtree. 2) Or how to add Check Box node(with check box control) in Jtree.3) all node is add in seam Tree using java swing.4) Please suggest me for this task . following is code sample :public class DynamicTreeView...
Answer 5 Mar 2013   license: CPOL
Richards comment is short form what you've got to do:create a function that you call before you create your GUI:public String[] doLogin(){ //create Dialog with a Comment and 2 Textfields JTextField name = new JTextField(); JPasswordField pwd = new JPasswordField(); // for...
Question 4 Mar 2013   license: CPOL
Hi all im writing a chat server program in eclipse i have the chat client and chat server talking to each other and wanted to add a username and password entry to this, i have the password field working but i cant for the life of me think of how get the chat program to run after clicking the...
Answer 9 Feb 2013   license: CPOL
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
Answer 9 Feb 2013   license: CPOL
To hide data in an image you need the compresion on the image to be lossless so you should use : PNG, GIF, BMP etc.
Question 8 Feb 2013   license: CPOL
hai guys,anyone can help me for this request " how to add table data from the selected combo box item " in java swing.
Question 8 Feb 2013   license: CPOL
which is best suitable image format for pixel level calculation {eg: getpixel,setpixel} . i want hide some data in image pixel. which format i prefer ? jpg or png,gif ,bmp or etc...?
Answer 8 Feb 2013   license: CPOL
That is because in BufferedImages with a ColorModel the pixel is set to the nearest colour chosen. That means that you might not get the colour you wanted because the colours you can set are limited to the colours in the ColorModel.You can get around that by creating your own BufferedImage...
Question 7 Feb 2013   license: CPOL
BufferedImage bimg = ImageIO.read(fc.getSelectedFile()); bimg.setRGB(0, 0, 1234); int x = bimg.getRGB(0,0);in the above code i didn't get x as 1234 why ?
Answer 5 Feb 2013   license: CPOL
The answer is: depends on who you are asking!Most people (including me) here in CP will probably say with .NET but the fact is that it's just an opinion, and some of my best friends (who are wrong about this question) will tell you with Java (being that it's cross OS). There you have...
Answer 5 Feb 2013   license: CPOL
I would say that at the moment it depends where you're at. If you're starting out and looking for a job, C++ with .NET is better. There's more work out there but it's not going to pay that well and it might be dull. On the other hand if you've got lots of experience in Java and you're really...
Answer 5 Feb 2013   license: CPOL
Just my two cents, but I see it more in OS related terms. Windows or Linux. If you're more a Linux or MacOS kind of guy, go to C++ and java else .Net is the way to go. It is also rarely a combination. Although it is a good idea to have knowledge of several technologies, often you use...
Question 5 Feb 2013   license: CPOL
Hello All,As this is community where there are developers for all platform.There are senior developers also and might be those people also that have completed there development period and now in management.I just want to ask according to current market trends which combination is better...
Question 31 Jan 2013   license: CPOL
Hi Please help me to resolve the Problem in drag drop . I am not able to drop the component from one panel to other if i use multiple panels. I want to drag the component to specified location in panel,after dropped that component able to drag within panel.But same function working fine in...
Answer 31 Jan 2013   license: CPOL
use mouse pressed and mouse released listeners and get the cordinates by using getX() nad getY() method in both the previously mentioned events
Question 13 Jan 2013   license: CPOL
I want to find one record that exists on a mysql database table using the following statement. The filteration is done using a textfiled. I am using Java & i don't use the JPA. Just simple mysql database connection with mysql connector.At the below I have pasted the whole java application....
Answer 8 Jan 2013   license: CPOL
String item = txtICode.getText();To Delete :sql = "DELETE FROM ITEMDETAILS WHERE ItemCode = '"+item+"'";To Retrivesql = "SELECT * FROM ITEMDETAILS WHERE ItemCode = '"+item+"'";
Answer 23 Dec 2012   license: CPOL
NO.That's the constructor. That one is by definition not supposed to execute code.public class ItemDetails extends JInternalFrame{ private Connection oConnection = null; public ItemDetails(){ } private Connection getDBConnection(){ if(null ==...
Question 23 Dec 2012   license: CPOL
When I am using JInternalFrame where and how am I able to connect a MS Access database using a separate class? I already create a class as the following.import java.sql.*;import javax.swing.*;public class Connect {Connection conn = null;ResultSet rs = null;PreparedStatement pst...
Answer 20 Dec 2012   license: CPOL
A Visual Guide to Layout Managers[^]@ the Java TutorialsPlease be aware that you can combine the layouts. Each Area (probably JPanel) can have it's own layout:Panel 1: Borderlayout- North: GridbagLayout all "Text"- West: "Textarea1"- East: "Textarea1" (should probably be...
Question 20 Dec 2012   license: CPOL
hiI Need to design a front end for my java application. The front end looks somewhat like this:In Panel...
Answer 20 Dec 2012   license: CPOL
Yepp - that can be...well, let's say "complicated". I have to deal with several languages in my applications, that's always fun:1. the machine has to be able to display the languageWhen you're able to change keyboard layout to the specific language, then the machine should be capable to...
Question 20 Dec 2012   license: CPOL
'm just beginner of Java.I'm trying to unicode (display) correctly Myanmar texts on Java GUI ( Swing/Awt ).I have four TrueType fonts which support Myanmar unicode texts. There are Myanmar3, Padauk, Tharlon, Myanmar Text ( Window 8 built-in ).You may need the fonts before the code. Google...
Answer 19 Dec 2012   license: CPOL
OK, it's Christmas time - so here we go with the complete solution:1. Take your current classes "Vehicle" and "Van" - those are looking quite fine now.the new constructors are good (beside of that you missed the "int intWheels" to be set in "Van", but that does not harm the app until it is...
Question 17 Dec 2012   license: CPOL
1.) I have created an abstract class as the following. All the methods that belongs to the class is also added as at the following. public abstract class Vehicles { public String vRegNo; public String vModel; public String vBrand; public boolean hired; // This hired...
Question 14 Dec 2012   license: CPOL
I am try to build a client server chat application using swing.In that when i start client i send a message that i can received at client site but when i press a button on Server site it will not open up a new Frame (that is in my case error here).How can i solve it...And can any one suggest...
Answer 11 Dec 2012   license: CPOL
Simple Solution:Your main method, which is the entry point for your app, needs to move out of the class van:public class VehicleManagement(){ public VehicleManagement(){ this.ignition(); } private void ignition(){ // code of former main goes here } public...
Answer 11 Dec 2012   license: CPOL
You need a class above the Vehicles - some VehicleFacade:public calls VehicleFacade {Vector vehicles = new Vector(); public VehicleFacade(){ /* doany(); */} public void addVehicle(Vehicle vehicle){ if(this.validateVehicle(vehicle)){ ...
Answer 22 Nov 2012   license: CPOL
You do not have the right to save in other locations.Default Policy Implementation and Policy File Syntax[^]Read it.
Question 22 Nov 2012   license: CPOL
I made a project in java using swings,in which i am facing problems:-one of the feature in the project is to encrypt the file and save it in another file after encryption but my project doesn't allow me to save the file in any disk rather than the desktop.......it says error while saving
Answer 8 Nov 2012   license: CPOL
What shall that be?Class.forName("com.mysql.jdbc.Driver");Shall that import something? It's throwing an uncaptured ClassNotFound Exception.Comment it out and the code will work.
Question 8 Nov 2012   license: CPOL
Here following is my code and as i make a client send some data it will show me But as i click on addd button it will not open up a new JFrame...Can any one solve my problem..import java.net.*;import java.io.*;import javax.swing.*;import java.awt.event.*;import java.awt.*;import...
Question 4 Nov 2012   license: CPOL
In my project, the requirement is to have 16 buttons horizontally and 16 buttons vertically (16 rows by 16 columns). It will look like a chess board. it should be selectable and can combine the selected buttons into 1 button. I found on the net that uses jtable which combine cells but...
Question 27 Oct 2012   license: CPOL
Hi everyone, I've got a small (I hope) yet interesting problem. I have got an assignment today at my university which causes me a headache by now. The job is to design a swing app which uses reflection to create an instance of a class called "Pravokutnik" (never mind the class name) which is a...
Article 18 Oct 2012   license: CPOL
Using this app, the ultrabook is able to automate various parameters like brightness, volume, back lit keys, etc.
Question 8 Oct 2012   license: CPOL
i have an Icon image = picture.getIcon();in my code and now i want to store this icon to somewhere in my disk as .jpg
Answer 8 Oct 2012   license: CPOL
SO you're not able to use the other answer[^]? Try this little helper:javax.imageio.ImageIO[^]
Answer 5 Oct 2012   license: CPOL
Check out the JFreeChart[^] projectIt will help you to accomplish the chart drawing.

Page 1 of 4
1 2 3 4


Advertise | Privacy | Mobile
Web01 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid