953 Posted Topics

Member Avatar for jinglylime

[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() { …

Member Avatar for mKorbel
0
97
Member Avatar for KhaosElement

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); …

Member Avatar for mKorbel
0
1K
Member Avatar for Bobonoinc

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)

Member Avatar for mKorbel
0
127
Member Avatar for canarian

[URL="http://download.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html"]How to Create Translucent and Shaped Windows[/URL]

Member Avatar for mKorbel
0
151
Member Avatar for StephNicolaou

hmmm I don't know [url]http://stackoverflow.com/questions/6993467/how-to-rotate-jximagepanel/6993818#6993818[/url]

Member Avatar for mKorbel
1
4K
Member Avatar for mike2828

and change Applet to JApplet and Button to JButton and public void paint(Graphics g) to public void paintComponent(Graphics g)

Member Avatar for mKorbel
0
147
Member Avatar for ckwolfe

put Board to the JPanel, then you only to myCOntainer.remove(myPanel); myCOntainer.revalidate(); myCOntainer.repaint();

Member Avatar for mKorbel
0
7K
Member Avatar for greatcornholio

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 …

Member Avatar for mKorbel
0
242
Member Avatar for needhelpinjav
Member Avatar for quartaela
Member Avatar for soham.m17

probably [URL="http://stackoverflow.com/questions/7217185/how-to-move-or-drag-a-graphics-class-object"]crossposted[/URL]

Member Avatar for soham.m17
0
4K
Member Avatar for vijaykavin10
Member Avatar for rotten69

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 …

Member Avatar for ceyezumma
0
433
Member Avatar for Dersev

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

Member Avatar for mKorbel
0
322
Member Avatar for ceyesuma

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 …

Member Avatar for mKorbel
0
209
Member Avatar for vijaykavin10

you can use [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/action.html"]javax.swing.Action[/URL]

Member Avatar for mKorbel
0
149
Member Avatar for vijaykavin10

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

Member Avatar for mKorbel
0
133
Member Avatar for aanders5

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

Member Avatar for mKorbel
0
113
Member Avatar for supersport

@ JamesCherrill isn't that about String.valueOf(values[?]), because its touch Casting (justMyQuickHelicopterView)

Member Avatar for inthearmynow99
0
1K
Member Avatar for mohamed moamen

[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

Member Avatar for mohamed moamen
0
444
Member Avatar for cozmo87

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 …

Member Avatar for cozmo87
0
623
Member Avatar for warlord902

@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

Member Avatar for mKorbel
1
982
Member Avatar for pradeep_java
Member Avatar for sirlink99

are you heard about Enum, that would be something for this job,

Member Avatar for Taywin
0
226
Member Avatar for bibiki

@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,

Member Avatar for bibiki
0
557
Member Avatar for yup790

@~s.o.s~ phhaaa another maybe [URL="http://stackoverflow.com/users/522444/hovercraft-full-of-eels"]physicist[/URL] but endeless coder as your person

Member Avatar for JamesCherrill
0
257
Member Avatar for aldeene

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

Member Avatar for mKorbel
0
168
Member Avatar for anand01
Member Avatar for blondielox

[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]

Member Avatar for NormR1
0
187
Member Avatar for sirlink99
Member Avatar for gahhon

I think the @Taywin meaning [CODE]Double myCalculation (double first, double second) { double someDouble = Math.pow(first, second); return someDouble; }[/CODE]

Member Avatar for gahhon
0
149
Member Avatar for alliswim2010

@alliswim2010 please read this [URL="http://www.daniweb.com/software-development/java/threads/384132"]thread[/URL]

Member Avatar for ~s.o.s~
0
729
Member Avatar for hessian26

[URL="http://download.oracle.com/javase/tutorial/uiswing/events/itemlistener.html"]ItemListener[/URL]

Member Avatar for mKorbel
0
183
Member Avatar for ferretfool0x77
Member Avatar for gunjannigam
Member Avatar for Majestics

@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 …

Member Avatar for Majestics
0
116
Member Avatar for Majestics

@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 :-)

Member Avatar for Kyberium
1
278
Member Avatar for sirlink99

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 …

Member Avatar for sirlink99
0
268
Member Avatar for SasseMan

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 …

Member Avatar for mKorbel
0
5K
Member Avatar for bibiki

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 …

Member Avatar for bibiki
0
108
Member Avatar for dangari

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

Member Avatar for mKorbel
0
790
Member Avatar for SUBZERO-08

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

Member Avatar for JamesCherrill
0
163
Member Avatar for MitchyMoo

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]

Member Avatar for MitchyMoo
1
141
Member Avatar for hacknayan

and use KeyBindings instead of KeyListener you have to setFocus() for JPanel, otherwise pretty to ignore any output from keyboard

Member Avatar for hacknayan
0
144
Member Avatar for CoolPrizes
Member Avatar for SasseMan

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

Member Avatar for mKorbel
0
956
Member Avatar for priyasubh

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 …

Member Avatar for mKorbel
0
1K
Member Avatar for nickmi

please read [URL="http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html"]tutorial[/URL] and if you will be real question then ask ...

Member Avatar for mKorbel
0
153
Member Avatar for javaNooblet

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

Member Avatar for mKorbel
0
216
Member Avatar for LittleMissChoco

add JRadioButtonMenuItem to the ButtonGroup, then only one JRadioButton from ButtonGroup could be selected

Member Avatar for LittleMissChoco
0
149

The End.