Posts
 
Reputation
Joined
Last Seen
Ranked #148
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
86% Quality Score
Upvotes Received
145
Posts with Upvotes
128
Upvoting Members
55
Downvotes Received
20
Posts with Downvotes
19
Downvoting Members
12
33 Commented Posts
15 Endorsements
Ranked #115
Ranked #72
~599.41K People Reached
Favorite Tags
Member Avatar for Vegito1991

I was doing GUI based application, when i run the MyChatPage particularly, it able to send the text to the server and send to the client textarea, which is my objective, but if i run from MyChatIP class and create new object to open the MyCHatpage frame, it will hang, …

Member Avatar for Muhamad_5
0
499
Member Avatar for rithish

[CODE] import java.awt.*; import javax.swing.*; import java.awt.event.*; class log extends JFrame { JButton b1=new JButton("ok"); JPanel panel=new JPanel(new GridLayout(2,2)); public log() { panel.add(b1); add(panel,BorderLayout.CENTER); b1.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent ae){ JPanel pan=new JPanel(); JFrame frame1 = new JFrame(); JButton b2=new JButton("ok"); pan.add(b2); frame1.setVisible(true); frame1.add(pan); frame1.setSize(250,100); b2.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent …

Member Avatar for ajax_1
0
2K
Member Avatar for emmstarr

The problem asks: Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as shown in the following sample run: Enter number of lines: 7 [CODE=text]......1 .....212 ....32123 ...4321234 ..543212345 .65432123456 7654321234567[/CODE] (except the example given shows spaces in between the …

Member Avatar for Jorge_12
0
5K
Member Avatar for altjen

hi, I am having a problem with adding button on jTable for each data I get from the database. here is what I get from database in SQLite try{ String sql = "select ClassName as 'Class Name', NumberOfStudents as 'Number of Students' from ClassRooms"; pst=conn.prepareStatement(sql); rs=pst.executeQuery(); Data_Table1.setModel(DbUtils.resultSetToTableModel(rs)); if(rs.next){ //code to …

Member Avatar for mKorbel
0
8K
Member Avatar for vilastadoori

Dear Listers, I have create a project in java using netbeans. Have designed the user interface where I have a jtable and a button. When i created the interface it automatically populated the code and I have done nothing When i click the button it shoiuld call the class to …

Member Avatar for vilastadoori
0
1K
Member Avatar for SasseMan

Hi! I'm sitting with a gui bug that I have been stuck with for a while. When a "view" is changed from one "view" to another, the new "view" doesn't get painted properly. The previous view is visibile randomly in the background. I can't reproduce this in the dev environment …

Member Avatar for Ali_55
0
1K
Member Avatar for Doogledude123

I'm curious, when setting the default close operation for JFrames, should you use JFrame's constants or WindowConstants' constants? As far as I can tell they're the same. Although, IntelliJ (not tested on other IDE's) prefers WindowConstants' EXIT_ON_CLOSE at least. So basically my question is, which one should be used? Which …

Member Avatar for JamesCherrill
0
275
Member Avatar for nataraja833

Hi , Can anyone point me to fillPolygon source code , In Graphics.java it is declared as abstract class . - Nataraja G

Member Avatar for nataraja833
0
1K
Member Avatar for Sandeep_13

Hi I am new in java. I am trying to get the stored date in the database and display the same in jdatepicker in frontend. But I failed. Can any one of you suggest how to do the same. Regards Sandeep

Member Avatar for mKorbel
-1
619
Member Avatar for rohtashrathore

Hi All, I have a problem in my jdialog(child) and the parent frame is jframe,it is taking two events to close the jdialog,both from the close caption available at the upperright corner of the dialog,as well as from the button add where i have used dipose() to close on single …

Member Avatar for mKorbel
0
242
Member Avatar for Start4me

I'm trying to show a user JOptionPane where they enter x and y coordinates each in their own textfield, but I don't know how to store user input as ints. So I need to do something like: int xCorFromUser = xCor; int yCorFromUser = yCor; I have this code so …

Member Avatar for mKorbel
0
1K
Member Avatar for Gayan Maduranga
Member Avatar for Gayan Maduranga
0
107
Member Avatar for sankubha

Now am using substance look and feel version 5.3.I want to upgrade the it to latest version 7.2.1. I need to know what is the new features in new version and difference between 5.3 and 7.2.1.why we need to prefer the new version.

Member Avatar for Schol-R-LEA
0
348
Member Avatar for pars99

I need to fill an image created using a ton of QuadCurves, but they don't fill it all the way using the traditional fill method. Any suggestions? public class MonstercatComponent extends JComponent{ public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; drawGrid(g2); g2.setStroke(new BasicStroke(5)); QuadCurve2D earLeft1 = new QuadCurve2D.Double(145, 155, …

Member Avatar for mKorbel
0
379
Member Avatar for Doogledude123

I'm making one of those puzzle games that has the empty tile which you need to slide them around to finish the picture. When I refer to the "Active Tile" I'm referring to the tile that's empty on the board. I'm changing the position of the active tile and the …

Member Avatar for JamesCherrill
0
235
Member Avatar for Stan_1

I do not know if this will be of use to anyone but i thought i would just leave it here because i saw a thread where someone asked how to determine if more than one button on a mouse is being pressed and this code below checks to see …

Member Avatar for mKorbel
0
148
Member Avatar for andruluchko

Hello, I try to rename file or directory using JFileChooser() and JButton(). But it gives me a NullPointer exeption. I have FileChooser, Button and TextField where I write new name for my file or directory. Can you say where I go wrong and how to solve this problem. // button …

Member Avatar for mKorbel
0
1K
Member Avatar for Doogledude123

I'm painting a grid on the JPanel and trying to scroll the grid with a JScrollPane. I have a feeling the scrollpane is getting the actual size of the panel, instead of the size including what is not being shown. Something along those lines at least, I can't quite wrap …

Member Avatar for mKorbel
0
1K
Member Avatar for Doogledude123

So, I've written a Custom Binary Format outline but I'm not sure how to translate it to code. I was looking for a few tips on where to get started? Here's my outline. MAPDATA { signature // U24 0x4D, 0x41, 0x50 (MAP) version // U8 0x01 width // U16 (MAX …

Member Avatar for JamesCherrill
0
824
Member Avatar for centenond

Hello im a total noob in java, im learning game development, i made this game and when i thought i was finish i tested in another android with a smaller screen and puf all the game was ugly. I started rezing evrything by screen width, example batch.draw(position.x, position.y,Gdx.graphics.getWidth()/7, Gdx.graphics.getWidth()/7 ); …

Member Avatar for centenond
0
335
Member Avatar for compscigirl

Hey everyone! I have to write a program that generates random shapes in a window, but when the window is resized the program can still remember the shapes and redraw the same ones. My code so far draws the random shapes, but when I resize the window, the shapes change …

Member Avatar for mKorbel
0
207
Member Avatar for TekknoDraykko

Greetings! I'm reviewing Java, in an effort to enhance my programming skills. I'm utilizing the book "*Teach Yourself Java in 21 Days*" and I'm currently learning about Java Web Start. I'm not sure I full understand how I'm supposed to use Web Start (based on the samples in the book) …

Member Avatar for stultuske
0
282
Member Avatar for johnny70

I want to remove the first line in jtextpane and setting setContentType("text/html") at the same time. setContentType("text/html"); Element root = getDocument().getDefaultRootElement(); Element firstLine = root.getElement(0); getDocument().remove(firstLine.getStartOffset(), firstLine.getEndOffset()); When I use setContentType("text/html") in the code it does not remove the first line.

Member Avatar for JamesCherrill
0
754
Member Avatar for haider885

package filehandling; import java.awt.event.ActionEvent; import java.io.*; import java.awt.*; import java.awt.event.ActionListener; import javax.swing.*; public class Filehandling extends JFrame{ JTextArea ja; JButton jb; Filehandling() { setBounds(400,400,400,400); setTitle("azeem"); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container cont= getContentPane(); ja=new JTextArea (); cont.add(ja,BorderLayout.CENTER); JPanel jp= new JPanel(); jb=new JButton ("Save"); jp.add(jb); cont.add(jp,BorderLayout.SOUTH); setVisible(true); } public static void main(String[] args) …

Member Avatar for mKorbel
0
304
Member Avatar for divinity02

hey all I have a program to write and I need to use the JOptionPane dialog box to use JOptionPane to say Yes_No_Option, all I would like to know what is the code to be used , how does it work and will it work in a program.

Member Avatar for divinity02
0
187
Member Avatar for Nation

I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including …

Member Avatar for mKorbel
0
1K
Member Avatar for Nation

I have a JTable that has four columns. In the second column I have assigned a JComboBox to be the cell editor of my column.The problem that I encountered is that I cannot handle the combobox the way I want. **What I want is that after a user select an …

Member Avatar for mKorbel
0
2K
Member Avatar for haider885

Here my code. package formsign; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.*; public class textF extends JFrame{ private JTextField fname; private JTextField lname; private JPasswordField pass; private JTextField country; private JTextField zip; private JTextField month; private JTextField day; private JTextField year; private JTextField phone; private …

Member Avatar for mKorbel
0
250
Member Avatar for Nation

Hello everyone, I have my code that is supposed to append an empty row to a table at runtime when a user presses the enter button. The code is working fine. here is the code if it helps: table.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == …

Member Avatar for Nation
0
122
Member Avatar for ali11

Can someobody tell me why i only see blank window. import java.awt.*; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.JTextField; public class dic extends JFrame{ public JLabel label1,label2,label3,label4,label5,titlel; public JTextField ew,fw; public JTextArea txar1,txar2; public JPanel …

Member Avatar for JamesCherrill
0
212