- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 145
- Posts with Upvotes
- 128
- Upvoting Members
- 55
- Downvotes Received
- 20
- Posts with Downvotes
- 19
- Downvoting Members
- 12
Re: - (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 … | |
Re: 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 … | |
Re: great, empty and unnecessary reply I'm vote jon.kiparsky and you | |
Re: 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 … | |
Re: - 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 | |
Re: 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 … | |
Re: 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.... | |
Re: @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 … | |
Re: - 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 … | |
Re: crossposted on [CodeRanch](http://www.coderanch.com/t/651240/GUI/java/mouse-events-close-jdialog) | |
Re: 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; … | |
Re: 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 | |
Re: I need to know .... new version. ---> no one of Insubstantials members is not here active | |
Re: 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, … | |
Re: 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 … | |
Re: - 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 | |
Re: [crossposted](http://stackoverflow.com/questions/29347965/rename-file-directory-using-jfilechooser-and-jbutton) | |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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 … | |
Re: - [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 | |
Re: - code (skeleton, logics) is correct, - not reason to setContentType("text/html"); at runtime | |
Re: 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) | |
Re: - JOptionPane can returns number, date, image, string - as is mentioned read API/Oracle tutorial - How to use Dialogs - two-three parts about JOptionPane | |
Re: [crossposted](http://stackoverflow.com/questions/28208443/printing-from-a-jtable-including-logo-and-footer) | |
Re: TableCellRenderer is called from all (could be very intensive, short period and repeatly) - Mouse Events inside JTable - Key Events - events implemented in rellated APIs | |
Re: I'm think that is designated for Swing Action | |
Re: - 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 … | |
Re: 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) |