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 #99
Ranked #72
~619.09K People Reached
Favorite Tags

953 Posted Topics

Member Avatar for Vegito1991

- (FileIO, JDBC) Socket are long and hard actions, - Swing in single threaded and updates to already visible Swing GUI must be done on Event Dispatch Thread, code from hard and long running events by default never to notify EDT, as you can see in your code, every notification …

Member Avatar for Muhamad_5
0
508
Member Avatar for rithish

at begining change classname from log to MyLog, to avdiods the conflict with reserved words for some Java Method Name [CODE]public void actionPerformed(ActionEvent e) {[/CODE] create a new class which contains just one TopLayoutCOntainer (JFrame, JDialog...) in type to the main method and inside actionPerformed [CODE]MyLo ml = new MyLog …

Member Avatar for ajax_1
0
2K
Member Avatar for emmstarr
Member Avatar for Jorge_12
0
5K
Member Avatar for altjen

1. about last column ( "Accept/Reject" ) - how can I reject ??? with simple JButton - JOptionPane should be always wrapped into invokeLater - moved to the end of EDTs queue 2. when teacher click a row - override isSelected in your Xxx(Table)CellRenderer / prepareRenderer, there is place to …

Member Avatar for mKorbel
0
8K
Member Avatar for vilastadoori

- for why reason(s) there is/are two arrays, models, ArrayList and DefaultTableModel - add records from database to DefaultTableModel directly, then to add model to JTable - search for TableFromDatabase, ResultSetTableModel

Member Avatar for vilastadoori
0
1K
Member Avatar for SasseMan

1) validate & invalidate is Look and Feel sensitive, and for some JComponents doesn't works correctly 2) validate is for add new JComponents to already Visible Container 3) revalidate is for remove JComponent (and then maybe add new JComponent) from / to already Visible Container 4) part of JComponents required …

Member Avatar for Ali_55
0
1K
Member Avatar for Doogledude123

there is significant difference WindowListener is designated for add (code block e.g. closing resources before) control the closing JVM processes in comparing with the JFrame.setDefaultClose....

Member Avatar for JamesCherrill
0
393
Member Avatar for nataraja833

@JamesCherrill wrote - Interesting question. A quick Google doesnt reveal any subclasses for Graphics2d - maybe they are private?, ---> not is available only for its parent - Graphics, @JamesCherrill wrote - Please post the answer here if you do find it! ---> yes, no problem with, e.g. :-) @Override …

Member Avatar for nataraja833
0
1K
Member Avatar for Sandeep_13

- assuming to store value as Date, TimeStampt in database - you have to use ResultSet.getDate() instead of little bit crazy parsing and then formatting String instance ... - every JDatePickers/JCalendar has setValue/Date(Date/Calendar), - every good JDatePickers/JCalendar has own FAQs with code examples - SpringLayout isn't good LayoutManager for newbee …

Member Avatar for mKorbel
-1
626
Member Avatar for rohtashrathore

crossposted on [CodeRanch](http://www.coderanch.com/t/651240/GUI/java/mouse-events-close-jdialog)

Member Avatar for mKorbel
0
255
Member Avatar for Start4me

JOptionPane is designated to returns multiple value from multiple fields two ways as is, - primitive array - (intialized) variables _________________________________________________________________ in all cases is required to test for (easiest by using if - elseif - else) switch (result) { case JOptionPane.OK_OPTION:// and returns from various JButtons // code break; …

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

1. put number to JTable column, better to play with model only 2. override getColumnClass for correct datatype (String, Double, Date, Icon...) 3. loop in concrete column by call getValueAt, result from this loop to add JTextField

Member Avatar for Gayan Maduranga
0
116
Member Avatar for sankubha

I need to know .... new version. ---> no one of Insubstantials members is not here active

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

secondary - put all graphics objects to the List - inside paintComponent loop inside array of Objects ______________________________________________________ important - don't to call anything from paintComponent - GeneralPath mouthAndTeeth = new GeneralPath(); those object must be prepared before, storred in array of painting, - paintComponent is designated for custom painting, …

Member Avatar for mKorbel
0
387
Member Avatar for Doogledude123

1. override getPrefferedSize instead of hunting for pixels perfections e.g. diff.getWidth()/getHeight(); 2. then inintial calculations about Width/Height is missunderstaning, thats should be part of paintComponent where getWidth()/getHeight() returns real pixels perfections at runtime 3. KeyListener is last of property for animations in Swing, use KeyBindings instead 4. there isn't reason …

Member Avatar for JamesCherrill
0
250
Member Avatar for Stan_1

- use methods from [SwingUtilities](http://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#isLeftMouseButton%28java.awt.event.MouseEvent%29), because there is mouse with 5 buttons - [AWTEventListener](https://docs.oracle.com/javase/7/docs/api/java/awt/event/AWTEventListener.html) can returns [MouseEvents](https://docs.oracle.com/javase/7/docs/api/java/awt/AWTEvent.html) too - have to accept that isn't possible to create two events from Mouse or KeyBoard in the same time

Member Avatar for mKorbel
0
152
Member Avatar for andruluchko

[crossposted](http://stackoverflow.com/questions/29347965/rename-file-directory-using-jfilechooser-and-jbutton)

Member Avatar for mKorbel
0
1K
Member Avatar for Doogledude123

override (based on code posted here) - getPreferredSize for GridPanel - use getHeight/Weight in paintComponent - change scroll increment for JScrollBar for natural scrolling _________________________________________________________________ important everything is elsewhere - no one knows how, what, where, why a size has JFrame, actual part of JSplitPane, not Dimension from JScrollPane, much …

Member Avatar for mKorbel
0
1K
Member Avatar for Doogledude123

I was looking for a few tips on where to get started? - is possible define MAPDATA as enum - depends of design I'm miss there tileCount == U32 and U32 == tileCount

Member Avatar for JamesCherrill
0
852
Member Avatar for centenond

quite disagree with @JamesCherrill 1. for Java animation is to use a java.util.Timer scheduleAtFixedRate == not is about Swing Timer with repaint or it should be from any more accurate timer (doesn't matter - java.util.Timer), but events are out of EDT in Java7/8 (removed all thread safe methods, incl. a …

Member Avatar for centenond
0
338
Member Avatar for compscigirl

but when I resize the window, the shapes change into new ones. - talking about resize from container to call repaint(from methods implemented in API), thats correct - create an array of Object, inside paintComponent loop inside this array, instead fo creating a new set of Obejcts, because paintComponent is/can …

Member Avatar for mKorbel
0
210
Member Avatar for TekknoDraykko

- [quite complete list of JWS](http://stackoverflow.com/tags/java-web-start/info), - also read jnlp ([Java Network Launching Protocol](http://stackoverflow.com/tags/jnlp/info)) - completed by [Andrew Thompso](http://stackoverflow.com/users/418556/andrew-thompson)n

Member Avatar for stultuske
0
284
Member Avatar for johnny70

- code (skeleton, logics) is correct, - not reason to setContentType("text/html"); at runtime

Member Avatar for JamesCherrill
0
770
Member Avatar for haider885

I want to copy TextArea text to a File... == for me (including properties from NativeOS, newline, tab, .....) is [JTextArea.write](http://docs.oracle.com/javase/7/docs/api/javax/swing/text/JTextComponent.html#write%28java.io.Writer%29)

Member Avatar for mKorbel
0
312
Member Avatar for divinity02

- JOptionPane can returns number, date, image, string - as is mentioned read API/Oracle tutorial - How to use Dialogs - two-three parts about JOptionPane

Member Avatar for divinity02
0
192
Member Avatar for Nation

[crossposted](http://stackoverflow.com/questions/28208443/printing-from-a-jtable-including-logo-and-footer)

Member Avatar for mKorbel
0
1K
Member Avatar for Nation

TableCellRenderer is called from all (could be very intensive, short period and repeatly) - Mouse Events inside JTable - Key Events - events implemented in rellated APIs

Member Avatar for mKorbel
0
2K
Member Avatar for haider885
Member Avatar for Nation

- JTable with KeyListener hasn't someting (never, doesn't react to) with KeyEvents in the TableCellEditorr, this is separate JComponent - fpr more informations about to read Oracle tutorial HOw to use Tables, part - Concepts: Editors and Renderers - never to use low level KeyListener for Swing JComponents, every JComponents …

Member Avatar for Nation
0
125
Member Avatar for ali11

another issue is scr1.getViewport().add(txar1,null);, don't to use JViewport as container, for more info to read Oracle tutorial - [How to Use Scroll Panes](http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html)

Member Avatar for JamesCherrill
0
219
Member Avatar for KetraCoder

How could I use these values to get a row? depends of array type where those Objects are stored, in most to todays arrays == get a number,from row 3, item 7. (accepts == e first row is row 0, first item on row is item 0. as noticed by …

Member Avatar for Slavi
0
287
Member Avatar for samisallaj

- good catch by @JamesCherrill "use this JLabel in a JTextPane"?, - use JEditorPane, without using JLabel as container for image (is possible but there couldn't be real reason for ...), - or JLabel (without parent from JTextComponents) is correct way to do that too

Member Avatar for samisallaj
0
292
Member Avatar for My_1

@JamesCherrill You could store your button references in a 10x10 array (or a 100 element array) as you create them. hmmm why bothering with, most of Object in Java APIs has historical artifacts from the distant past - [public final void putClientProperty(Object key, Object value)](http://docs.oracle.com/javase/7/docs/api/javax/swing/JComponent.html#putClientProperty%28java.lang.Object,%20java.lang.Object%29) then (for/grom Swing rellated APIs) …

Member Avatar for JamesCherrill
0
328
Member Avatar for COKEDUDE

[crossposted](http://stackoverflow.com/questions/27221175/jcheckbox-and-jcheckboxmenuitem-java)

Member Avatar for mKorbel
0
355
Member Avatar for johnson_2
Member Avatar for mKorbel
0
568
Member Avatar for Pravinrasal

Yes i know that but still i didn't see the scroll bar on jframe... there are three possible issues - contents Size that you put ot the JScrollPane is lover than JViewPort View - you nothing put to the JScrollPane - change XXX_SCROLLBAR_AS_NEEDED to XXX_SCROLLBAR_AS_ALLWAYS

Member Avatar for Pramodkumar_1
0
7K
Member Avatar for Desmond_1

1. Please enter an integer 2. value cannot be 0 or negative put there JFormattedTextField, better JSpinner with number formatter, more in Oracle tutorial

Member Avatar for mKorbel
0
668
Member Avatar for moaz.amin.37

[CardLayout](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html)

Member Avatar for mKorbel
0
168
Member Avatar for Doogledude123

(isn't my cup of java) but you have to set for Scene size (if I'm remember correctly)

Member Avatar for Doogledude123
0
271
Member Avatar for Doogledude123

1. read [Initial Thread](http://docs.oracle.com/javase/tutorial/uiswing/concurrency/initial.html) 2. create JFrame as local variable 3. where going code line menuPanel.setLocation(0, 0);, because JFrame has BorderLayout in API 4. mode code lines from private void initGUI() and private void addGUIComponents() to constructor public PokeBase() 5. put LineBorder to JPanel for testing purposes 6. JTree should …

Member Avatar for Doogledude123
0
354
Member Avatar for Violet_82

Or is it something that with time I will just know? -yes you have to accept that some XxxListener firing only one events, another two

Member Avatar for Violet_82
0
309
Member Avatar for Violet_82

- only one JRadioButton can firing SELECTED event in the case that they are added ButtonGroup - (something that make me some sence) use JRadioButtons with ItemListener without limitation came from ButtonGroup, or add JRadioButtons to ButtonGroup listened by ActionListener - (hightlevel) is possible, you can play with AbstractButton, better …

Member Avatar for JamesCherrill
0
298
Member Avatar for rowen_1

- use [Swing Timer](http://docs.oracle.com/javase/tutorial/uiswing/misc/timer.html) instead of Thread.sleep()

Member Avatar for JamesCherrill
0
185
Member Avatar for quontra123

@JamesCherrill most of us living in 21th. century, then little bit modified (actual research about interest to learnt something new) - time ---> 85-90pct of scale - willingness to spent this time ---> 7-8pct of scale - access to a computer and the internet ---> 2-3pct of scale - reasons …

Member Avatar for happygeek
-2
116
Member Avatar for asaidi

seems like as author of [Official Oracle tutorial about CardLayout overtaken this question for about a few years....](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html)

Member Avatar for mKorbel
0
190
Member Avatar for kishor.m.n

too hard to say something cleaver (after question is already answered by @JamesCherrill), just about good practicies that haven't any conflict(s) with methods implemeted in Layout Managers APIs (sizing of screen, setXxxSize, ...) import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.GridLayout; import java.awt.LayoutManager; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Member Avatar for mKorbel
0
10K
Member Avatar for soujanya.bhat.184

- most of GUI APIs, frameworks are single threaded - Swing/AWT GUI doesn't care that Workers Thread update Swing/AWT methods (from =>Java4), or freeze until heavy and long background task ended, without repainting programatically to Swing GUI by using invokeLater (just methods implemented in Swing/AWT APIs) - your code snippeds …

Member Avatar for mKorbel
0
138
Member Avatar for TonSingle

I'm doubt that question in this form is answerable, you have to provide more effort than that

Member Avatar for mKorbel
0
108
Member Avatar for Netherblood

for why reason(s) to call class_members (maybe is/are important == homework) from outside and basics JButtons methods

Member Avatar for mKorbel
0
311
Member Avatar for asaidi

another of reasons to post an SSCCE, short, runnable, compilable with hardcoded value in local variable for JTable/XxxTableModel instead of shadowing JDBC

Member Avatar for mKorbel
0
302

The End.