953 Posted Topics

Member Avatar for bibiki

I can't see reason for creating ArrayList<Match> look for (Vector<Vector<Object>> rowData, <Vector<String>columnNames) some loop.... Vector<Object> row = newVector<Object>(); row.add(hostid); row.add(guestid); row.add(matchid); row.add(result); rowData.add(row) end of some loop.... or better DefaultTableModel#addRow, then just JTable#setModel(DefaultTableModel)

Member Avatar for bibiki
0
673
Member Avatar for jet101
Member Avatar for lse123
Member Avatar for Feriscool
Member Avatar for mKorbel
0
197
Member Avatar for Kevingon

UIManager.put (key, font); rellated for UIManager.put("Button.font", font); UIManager.put("ToggleButton.font", font); UIManager.put("RadioButton.font", font); UIManager.put("CheckBox.font", font); UIManager.put("ColorChooser.font", font); UIManager.put("ComboBox.font", font); UIManager.put("Label.font", font); UIManager.put("List.font", font); UIManager.put("MenuBar.font", font); UIManager.put("MenuItem.font", font); UIManager.put("RadioButtonMenuItem.font", font); UIManager.put("CheckBoxMenuItem.font", font); UIManager.put("Menu.font", font); UIManager.put("PopupMenu.font", font); UIManager.put("OptionPane.font", font); UIManager.put("Panel.font", font); UIManager.put("ProgressBar.font", font); UIManager.put("ScrollPane.font", font); UIManager.put("Viewport.font", font); UIManager.put("TabbedPane.font", font); UIManager.put("Table.font", font); UIManager.put("TableHeader.font", font); UIManager.put("TextField.font", …

Member Avatar for Kevingon
1
686
Member Avatar for simply2smart

static final String newline = System.getProperty("line.separator"); if returns null then is possible to define that System.setProperty("Whatever"), sure valid until current instance exists

Member Avatar for javaAddict
0
200
Member Avatar for javaNooblet

@javaNooblet consider using [URL="http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html"]JFormattedTextField[/URL] instead of JTextField, example about how to use Number instance included getValue() from JFormattedTextField is in form [CODE]((Number)amountField.getValue()).doubleValue();[/CODE]

Member Avatar for NormR1
0
4K
Member Avatar for Whilliam
Member Avatar for lena1990

tutorial about [URL="http://download.oracle.com/javase/tutorial/2d/printing/index.html"]Printing[/URL], but carrefully with Services and atributess

Member Avatar for mKorbel
0
65
Member Avatar for abhishekwaichal
Member Avatar for elkowalski
Member Avatar for elkowalski
0
535
Member Avatar for gunjannigam

there are lots of mistakes in this thread, there are problems with Concurency in the Swing, redirecting hardiest and longiest code to the Background Thread (open Connection, basic I/O, unknow paint() instead of paintCompoentn(), close connection ....) for diplaying images in the Java GUI is better look for [URL="http://download.oracle.com/javase/tutorial/uiswing/components/label.html"]JLabel[/URL], because …

Member Avatar for mKorbel
0
866
Member Avatar for sohiabmaroof

Swing tutorial is probably best place for that, there are everything about [URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html"]JTable[/URL] inc examples, another [URL="http://www.java2s.com/Code/Java/Swing-JFC/CatalogSwing-JFC.htm"]here[/URL], if you'll have reall question, with specific problem, then don't forget to ask ...

Member Avatar for 115harman
0
211
Member Avatar for abrarHuniedi

[URL="http://download.oracle.com/javase/tutorial/uiswing/index.html"]Swing turotial[/URL] shows [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/card.html"]CardLayout[/URL] as best option for lots of different views

Member Avatar for mKorbel
0
51
Member Avatar for alteran

that's job for [URL="http://download.oracle.com/javase/tutorial/uiswing/components/slider.html"]JSlider[/URL] or [URL="http://download.oracle.com/javase/tutorial/uiswing/components/spinner.html"]JSpinner[/URL]

Member Avatar for alteran
0
196
Member Avatar for hfx642

that reason why [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/action.html"]javax.swing.Action[/URL] exists, then you can forgot for override KeyBindings, PropertyChangeListener and MouseListener,

Member Avatar for JamesCherrill
1
666
Member Avatar for dennysimon

all of Swing JComponents can returns PreferredSize by default, or you can help them by usingfor example [CODE]JTextField myTextField = new JTextField(15) JTextArea myTextArea = new JTextArea (20, 5) JComboBox myComboBox = new JComboBox () myComboBox.setPrototypeDisplayValue("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")[/CODE];

Member Avatar for dennysimon
0
6K
Member Avatar for billingsj09

[URL="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html"]Collections.sort()[/URL]

Member Avatar for NormR1
0
199
Member Avatar for lena1990

why if you use IDE then you have to advantage, only to swith the Language n the Project properties, I can't to heard that someone had problem with that, isn't it

Member Avatar for Majestics
-2
106
Member Avatar for sirlink99

just stupid question, are you tried runing that as JFrame instead of JApplet, because from Java1.6_025 there are some changes about Security

Member Avatar for mKorbel
0
517
Member Avatar for pro_learner

don't use Thread#sleep(int) for GUI, because could be generated unexpected output to the GUI, that's for Thread, Executor for GUI is there [URL="http://download.oracle.com/javase/tutorial/uiswing/misc/timer.html"]javax.swing.Timer[/URL]

Member Avatar for pro_learner
0
266
Member Avatar for harinath_2007

redirect capture screen to the BackGroung Task for example Runnble#Thread, SwingWorker, or for periodical Executor & java.util.Timer, succes with plain java.util.Timer is possible, but is ugly (my view), then GUI lives separate life, doeasn't freeze or waits for something ends

Member Avatar for mKorbel
0
121
Member Avatar for maxypro

[URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html#sorting"]here[/URL]

Member Avatar for Onlineshade
0
185
Member Avatar for Majestics

sorry for my input, because I'm not professional, and with my knowledge about Java would be a great impudence coding anything in this PL :-) JXTreeTable or Outline by Netbeans are basen on JTreeTable (again somebody sometimes to forgot for something, for JTreeTable especially, long time without any progress)

Member Avatar for Onlineshade
0
180
Member Avatar for hfx642

I'm not sure if I understood the language of your trunk ... [CODE]import java.awt.*; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.text.*; public class TestDigitsOnlySpinner { public static void main(String... args) { SwingUtilities.invokeLater((Runnable) new Runnable() { @Override public void run() { JSpinner jspinner = makeDigitsOnlySpinnerUsingDocumentFilter(); jspinner.setFont(new Font("Dialog", Font.BOLD | Font.PLAIN, 18)); JPanel …

Member Avatar for mKorbel
0
146
Member Avatar for MasterOfNothing
Member Avatar for MasterOfNothing
0
331
Member Avatar for newbie14

you closing "stmt" in one of another subquery statements 1/ you have to declare stmt twice because concur thread that used statemet can closed that as you can see in your error from JDBC Driver 2/ declare only variables valid for concrete try-catch-finally block or void

Member Avatar for JamesCherrill
0
154
Member Avatar for Anuradha Mandal

IDE is almost better for profesionals, everything is there automatically, but there are everything most complex, most automatically, there is everything and IDE is for fastest programing as exists, IDE don't learning you Java programing language, just writing code is easiest that's your decision

Member Avatar for icyfiren
0
99
Member Avatar for Majestics

@Majestics I really love your opened questions, but this one could be the best of ..., 1) I miss question 2) I miss question here 3) I miss question here for given topic 4) why did you ask this question 5) I miss there real question, Android isn't complicated so …

Member Avatar for Majestics
0
147
Member Avatar for yinp

[CODE]My application should reflect a tree structre with about 8000 members but directly under the root there are maximum 15 members.[/CODE] correct why not, there I can't see any issues with performence or freeze, but see my next comment [CODE]Its clear that each time a user open the application he …

Member Avatar for JamesCherrill
0
211
Member Avatar for superjj

[CODE]AbstractButton abstractButton = (AbstractButton) event.getSource(); boolean selected = abstractButton.getModel().isSelected();[/CODE]

Member Avatar for superjj
0
116
Member Avatar for khurram01
Member Avatar for tmcpro

[url]http://download.oracle.com/javase/tutorial/uiswing/components/index.html[/url] and [url]http://www.jfree.org/jfreechart/[/url]

Member Avatar for mKorbel
0
187
Member Avatar for Majestics

and what did you tried, nothing complicated 1) (for fun, but safiest way) get popup from JComboBox.getComponent[0] 2) or directly add JList with pre-definned popup for its Items

Member Avatar for mKorbel
0
129
Member Avatar for Upoma
Member Avatar for warlord902

you have to edit genetrated code and swith to the expected L&F or as you mentioned to the [URL="http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html"]Nimbus Look and Feel[/URL]

Member Avatar for mKorbel
0
867
Member Avatar for Majestics

JComboBox has two states EDITABLE and Non-EDITABLE yes that works as JTextFields, because JComboBox is compound JComponents, you can extract (be sure that is L&F sensitive don9t exxpect that definitions for Metal L&F can works on OS MAC.getSystemLook...) JButton of JTextField all JComponetns has own Model, and for non-editable Components …

Member Avatar for mKorbel
0
1K
Member Avatar for sealxlion

@Ezzaral very good point +1 @sealxlion don't mixing Java AWT Frame with Swing JFrame, that really road to the hell, for todays GUI is required --> all Components must starts with Char [B]J[/B] then Frame fram = new Frame(); should be JFrame fram = new JFrame(); and as @Ezzaral suggested …

Member Avatar for mKorbel
0
169
Member Avatar for lena1990

@lena1990 [URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html"]nothing complicated[/URL]

Member Avatar for mKorbel
0
98
Member Avatar for Majestics

for me google works as expected, take only code from java2.com, there is workaround in two classes, one for JComboBox, 2nd. for JtextField (and this one I love so much with redirect the suggestion to the JDialog/JWindow) 1/ you can set if is strict or not 2/ no performance issues …

Member Avatar for Majestics
0
1K
Member Avatar for syeda amna

you have two options (valid for all LayoutManegers excluding AbsoluteLayout) 1/ jumping with [URL="http://download.oracle.com/javase/tutorial/uiswing/components/toplevel.html"]Top-Level Container[/URL] on the Screen, then look for [CODE]pack();[/CODE] 2/ jumping with expected [URL="http://download.oracle.com/javase/tutorial/uiswing/components/panel.html"]JPanel[/URL], then look for [CODE] JPanel#setPreferredSize(new Dimension(int, int)) JPanel#revalidate(); JPanel#repaint(); [/CODE] both are valid, but for OP' is required second from options, any ideas …

Member Avatar for JamesCherrill
0
138
Member Avatar for bangor_boy

for JComboBox you have to change Listener from ActionListener to the [URL="http://download.oracle.com/javase/tutorial/uiswing/events/itemlistener.html"]ItemListener[/URL], I know that [URL="http://download.oracle.com/javase/tutorial/uiswing/components/combobox.html"]official tuturial[/URL] descibed ActionListener, if you want to make some changes to inside, back to the JComboBox then look for ActionListener, for output from JComboBox to the GUI is almost better ItemListener

Member Avatar for NormR1
0
855
Member Avatar for Majestics

that really wrong way, but in other hands works too, but for whole JVM instance post by @JamesCherrill goes another direction, then could it be same as you set any methotds for JLabel, JPanel .... that isn't Custom JToolTip, just override vanilla UI

Member Avatar for mKorbel
0
158
Member Avatar for Majestics

[url]http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html[/url], sometime, someone to forgot for something to implemets, nothing else

Member Avatar for Ezzaral
0
144
Member Avatar for Majestics

are meaning A&14 == A00014 A&150 == A00150 don't do it that, that really stupid idea, subString() or String.format [CODE]import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class GenerateProgresId { private static String[] aChar = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", …

Member Avatar for Majestics
0
119
Member Avatar for xinwei

just as @NormR1 suggested debug alighment to the FloorsLines by using System.out.println(someValue); 1/ still you have problem with TOP & BOTTOM, where elevator JUMP-OUT (2-3 pixels) 2/ same for each FLOOR [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; // The Main class, The ButtonPanel class receives and handles button pressing events …

Member Avatar for xinwei
1
756
Member Avatar for anand01
Member Avatar for anand01
0
145
Member Avatar for Majestics

[url]http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html[/url]

Member Avatar for Majestics
0
168
Member Avatar for yt0729

@hfx642 Choise is pre-dinosaurus form of JComboBox that comning from Java AWT and silently died in the last centaury

Member Avatar for mKorbel
0
191
Member Avatar for bangor_boy

[CODE]SwingUtilities.invokeLater(new Runnable() { @Override public void run() { textArea.setText(someString); } });[/CODE]

Member Avatar for mKorbel
0
146

The End.