953 Posted Topics
Re: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.table.*; public class TableWithTimer extends JFrame { private static final long serialVersionUID = 1L; private JScrollPane scroll = new JScrollPane(); private JTable myTable; private int count = 0; private int delay = 3; private javax.swing.Timer timer = null; public TableWithTimer() { … | |
Re: runnable doesn't makes miracles itsefl, you ahve to look for [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/timer.html"]javax.swing.Timer[/URL], for example (change Stars to the Balls) [CODE]import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.SwingUtilities; import javax.swing.Timer; //http://stackoverflow.com/questions/3256269/jtextfields-on-top-of-active-drawing-on-jpanel-threading-problems/3256941#3256941 public class AnimationBackground { public AnimationBackground() { Random random = new Random(); JFrame frame = new JFrame("Animation Background"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); … | |
Re: there are[URL="http://download.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html"]SwingUtilities[/URL] more than two methods (child to parent, parent v.s. childs, getDeepestComponentAt) | |
Re: [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html"]How to Create Translucent and Shaped Windows[/URL] | |
Re: hmmm I don't know [url]http://stackoverflow.com/questions/6993467/how-to-rotate-jximagepanel/6993818#6993818[/url] | |
Re: and change Applet to JApplet and Button to JButton and public void paint(Graphics g) to public void paintComponent(Graphics g) | |
Re: put Board to the JPanel, then you only to myCOntainer.remove(myPanel); myCOntainer.revalidate(); myCOntainer.repaint(); | |
Re: you have to implemnts DefaultListModel, that best way how to do it, there you can add/remove, change particular Item(s) nobody going to debug code for you, but my quick helicopter view -> split your question to the 5-8 separated questions, because there are lots of mess that can generated un-expected … | |
Re: I'm sorry that I late | |
Re: @quartaela are you everywhere ??? | |
Re: probably [URL="http://stackoverflow.com/questions/7217185/how-to-move-or-drag-a-graphics-class-object"]crossposted[/URL] | |
Re: to avoids any miss_understood, there any good Auto_Generated code, nor correct, all these Frameworks died on long time ago, we have to forgot about that all frameworks that exists there are built on plain methods that came from ATW and Swing, From these Components is somethimes not possible to returns … | |
Re: your issues will be simple solved by reading these tutorials [URL="http://download.oracle.com/javase/tutorial/uiswing/components/list.html"]How to Use List[/URL] [URL="http://download.oracle.com/javase/tutorial/uiswing/components/icon.html"]How to Use Icons[/URL] [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/index.html"]Laying Out Components Within a Container[/URL] [URL="http://download.oracle.com/javase/tutorial/uiswing/events/listselectionlistener.html"]How to Write a List Selection Listener[/URL] especially [URL="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html"]Concurrency in Swing[/URL] examples from these tutorials covered more than you really needed for your project | |
Re: 1) admin_pay_rate DECIMAL(5,2) returns by defauld 99,999.99 that top, otherwise cut all numeric possitions 1,000,000.99 is there 00,000.99, remove that because that is *** 2) for formating is there String.format("%.2f", myNumber); or DecimalFormat decFormat = new DecimalFormat("0.00"); or BigDecimal bd = new BigDecimal(d); bd = bd.round(new MathContext(3)); remove that, beacuse … | |
Re: you can use [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/action.html"]javax.swing.Action[/URL] | |
Re: there no reason to create ContentPane in todays > Java6, in Java5 there were added simple plain JComponent, with pre-implemnted BorderLayout, all another JComponents have got implemented FlowLayout | |
Re: if you'll start with hand_made code, and for the BorderLayout no needed to remove un-wanted JCOmponent, only add new and then call revalidate + repaint | |
Re: @ JamesCherrill isn't that about String.valueOf(values[?]), because its touch Casting (justMyQuickHelicopterView) | |
Re: [CODE]long start = System.currentTimeMillis(); long end = 0l; long elapsed = 0l; // your code end = System.currentTimeMillis(); elapsed = end - start; System.out.println(("Search Spent " + ((int) (elapsed / 1000)) + " seconds");[/CODE] but some Java Gurus told that System.nanoTime(); is more precious | |
Re: 1) create JFrame and set its as parent for JWindow 2) why is there two Top-Level Containers JFrame and JWindow Too 3) in most cases JWindow must have to own parents tere are JFrame or JDialod, this parent must be initialized before, then you can build JWindow 4) you code … | |
Re: @JamesCherrill don't sub_class no, nothing, never inside Renderer, as you correctly said Renderer returns by default JLabel (on Edit JTextField), then why overrode JLabel by using JLabel, for those .... is there Editor | |
| |
| |
Re: @bibiki my questions 1) what TableModel 2) how do you add/remove JTable contents, 3) by JButton_click you get data from database, where those ends, 4) are you using some Custom L&F look for resultsettablemodel or better tablefromdatabase, then you'll never care about that, once defined, still works, | |
Re: @~s.o.s~ phhaaa another maybe [URL="http://stackoverflow.com/users/522444/hovercraft-full-of-eels"]physicist[/URL] but endeless coder as your person | |
Re: not tested just doesn't make me sence fill data inside WindowListener, move fill data from WindowListener to the separate void, class and I hope that DriverManager works | |
Re: @~s.o.s~ (-: why you have to sent here your post twice :-) | |
Re: [CODE]I need someone to give me instructions on how to use an image in netbeans and how to fix my outofbounds error.[/CODE] (just about Image) look for [URL="http://download.oracle.com/javase/tutorial/uiswing/components/icon.html"]Icon [/URL]in the [URL="http://download.oracle.com/javase/tutorial/uiswing/components/label.html"]JLabel[/URL] | |
Re: again same suggestion as I gave you more than twice | |
Re: I think the @Taywin meaning [CODE]Double myCalculation (double first, double second) { double someDouble = Math.pow(first, second); return someDouble; }[/CODE] | |
![]() | Re: @alliswim2010 please read this [URL="http://www.daniweb.com/software-development/java/threads/384132"]thread[/URL] |
Re: [URL="http://download.oracle.com/javase/tutorial/uiswing/events/itemlistener.html"]ItemListener[/URL] | |
Re: try - catch - finally up to Java6, in Java7 try - finally | |
| |
Re: @Majestics be sure that would be sensitive (I read that only for WinOS) 1) Native OS (you have override all input/outout from/to the SubSystem, and extract WinOS rellevant...) 2) Look and Feel (you have override all bases for JComponents DefaultUI, BasicUI, MetalUI, WhateverUI 3) these methods as inherits or implements … | |
Re: @Majestics I really can't ...(better ask question in all your cases), not sure if with mouse or as suggested @hfx642 ??? both ways are pretty simple, you must waiting for some of profesional, because your last waiting moved you wrong way :-) | |
Re: 1) use KeyBindings instead of KeyListener, becasue invoke correct Action from key 2) output from Runnable to the GUI must be wraped into invokeLater in all cases that I know, 2a) for quick animation, refreshed on short period you, that's could paused by using Thread.sleep(int), (but to avoiding to conflict … | |
Re: don't do it that, why bothering with that, why reinvent the wheel 1) look for Custom Java Look and Feel, most of them are free and with better output to the GUI as non-free, 2) that isn't about paintComponent, but override DefaultPanelUI or BasicPanelUI, and inside those methods is there … | |
Re: 1) nobody told us, that part of JComponents would be added to the COntainer are un-visible and occupated/filled oe create free space, 2) Nested layout (as you described) is best way/logics how to very confortable layout anything 3) combine Border/Grid and nested Containers by GridBagLayout 4) look for MigLayout, but … | |
Re: if I remember correctly, for MsSql Express is syntax little bid different, search for that because this syntax must contains word Express before IP address | |
Re: yes, from your [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/keybinding.html"]KeyStroke[/URL] only to call but1.doClick(); wrapped into javax.swing.Actions or ActionsLitener | |
Re: both aren't userfriedly, if there needed something overlay, then look for paintComponent() JLayeredPane, because is not confortable paint() Graphics2D to GlassPane/RootPane otherwise (if is possible) to look for [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/card.html"]CardLayout[/URL] | |
Re: and use KeyBindings instead of KeyListener you have to setFocus() for JPanel, otherwise pretty to ignore any output from keyboard | |
Re: wrong this code missed a few astronomic constants, everything is up-side-down, | |
Re: there are two ways 1) create once JWindow/JDialog and re-use that, JDialog#setModal(true) block all user inputs except ALT-F4 2) implements GlassPane | |
Re: 1) if is possible put JCheckBox or JComboBox to the TableCell, 2) if is possible put JPanel with JRadioButtons to the TableCell 3) somehow I don't want to look or test your code, because untill today I never see correct workaroung for JRadioButtons in JTable, correct on CellRenderer and CellEditor … | |
Re: please read [URL="http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html"]tutorial[/URL] and if you will be real question then ask ... | |
Re: nothing to your question, but consider using [URL="http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html"]JFormattedTextField[/URL] instead of JTextField, because Number instance allows only Digits and DecimalSeparator | |
Re: add JRadioButtonMenuItem to the ButtonGroup, then only one JRadioButton from ButtonGroup could be selected |
The End.