953 Posted Topics
Re: JComponents must returns ScreenSize, not JFrame#setSize(); 1/ don't use setSize() 2/ don't usee setBounds() 3/ JFrame#setSize() is including "blueColoredToolbar" + EtechedBorder that came from Native OS 4/ set preferredSize ... 5/ I talking about that in your thread ... 6/ setSize() and setBounds() multiplayed spend time needed for start -> … | |
Re: that isn't menu :-) that Dockable Panel, nothing complicated by using standard LayoutManager and [URL="https://github.com/Insubstantial"]Insubstantial[/URL] has (I love that) office2007lookandfeel, but this LaF is very sensitive for EDT, for JTable, JTree you have to look for invokeAndWait instead of invokeLater, EDIT: suck at first code source, folder test -> class … | |
Re: maybe I talking with you 3rd.times (posts on another forum), but that is very old API == page botton displayed Last modified 14 March, 2002, just question: are you able to works with Aglets examples, aren't you | |
Re: before post the code here please look [URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html"]here[/URL] and [URL="http://www.java2s.com/Code/Java/Swing-JFC/Table.htm"]here[/URL] and [URL="http://www.exampledepot.com/egs/javax.swing.table/pkg.html"]here[/URL] | |
Re: your problem is in MovieDirector class constructor takes wrong parameters [CODE]public MovieDirector(String Title, int Units, double ItemNumber, double Price, String Director) { [/CODE] change [CODE]double ItemNumber[/CODE] to the [CODE]int ItemNumber[/CODE] | |
Re: that isn't code, there I missed definitions for JTable, JComboBox, whatever about Swing and your code logics [CODE]myTable.getModel().setValueAt(row, column, value);[/CODE] | |
Re: and now I need to say that without posting here (your) runnable code is everything in academic ..., and with some important mistakes | |
Re: please post here runnable code that contains per once of JComponents ..., be sure that by creating this example you'll find this mistake | |
Re: you have to Encode your outPut/input Straem with proper Charset [CODE]byte input/outputSteam[] = myString.getBytes("ISO-XXXX-X"); String myEncodedString = new String(input/outputSteam, "ISO-XXXX-X"); [/CODE] //NOTE X == equals Numbers represents chinese Charset from Native OS | |
Re: [CODE]private Object[][] data = { {"I1",new Boolean (false) , new Boolean (true), new Boolean (true), new Boolean (true), {"I1",new Boolean (false) , new Boolean (true), new Boolean (true), new Boolean (true),{"I1",new Boolean (false) , new Boolean (true), new Boolean (true), new Boolean (true),{"I1",new Boolean (false) , new Boolean (true), new … | |
Re: [I]can you give samples?[/I] yes why not - [url]www.google.com[/url] | |
Re: and start with this idea (don't forget that all about parsing double value from JComboBox is endless bullS***) from [url]http://download.oracle.com/javase/tutorial/uiswing/index.html[/url] [CODE]import java.awt.*; import java.text.NumberFormat; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.math.RoundingMode; import javax.swing.*; public class MortgageCalc extends JFrame { //This creates all the buttons and windows private static final long serialVersionUID … | |
Re: basically this code works src ---> myFolder ------------> myClassWhichLoadsImage ---> myFolder.Images --------------------> someImage.jpg then you can call [CODE]try { image = imageIO.read(myClassWhichLoadsImage.class.getResource( "Images/someImage.jpg") } catch (IOException ex) { Logger.getLogger(myClassWhichLoadsImage.class.getName()). log(Level.SEVERE, null, ex); } frame.setIconImage(image);[/CODE] | |
Re: and if you change [CODE]File file = new File("/disk/ip/ipgal/projects");[/CODE] to [CODE]File file = new File("\\disk\\ip\\ipgal\\projects");[/CODE] network access required [CODE]File file = new File("\\\\disk\\ip\\ipgal\\projects");[/CODE] | |
Re: [CODE]int c=10; while(c<10) { System.out.println("loop inside No -> " + c); c++; } System.out.println("loop over.");[/CODE] | |
Re: you have to buy the access to the real Market (MarkToMarket) Prices, Bloomber is best for Securities at all, Reuters, lots of Banks, CapitalMarkets sells these Market Data, Indicators, Assumptions, another solutions are with non-market prices, only free and correct are closing/opening daily prices from Boerse or by some of … | |
Re: don't do that, you have to calculate with byte lenght in compiled code, in Java this warnigs starting if you received error about Incompatible magic value, and another ZOO, but in other hands if you'll will learn more about PL's, then you'll able to change all variables declared (valid for … | |
Re: @Muralidharan.E only changed your all Un-Swing *** [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Test_event_on_button extends javax.swing.JFrame { private static final long serialVersionUID = 1L; private JButton jbutton1; private JTextField jtextfield; private int count; public Test_event_on_button() { setLayout(new GridLayout(0, 1, 5, 5)); jbutton1 = new JButton("Button to handle both … | |
Re: nothing changed only created/added Swing rulles [CODE]import javax.imageio.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; public class CaptureScreen implements ActionListener { private JFrame f = new JFrame("Screen Capture"); private JPanel pane = new JPanel(); private JButton capture = new JButton("Capture"); private JDialog d = new JDialog(); private … | |
Re: crossposted [url]http://stackoverflow.com/questions/6936565/mouserotate-using-java3d[/url] ![]() | |
Re: [CODE]"<html> Some notice: <br>" + " - some text <br>" + " - some text <br>" + " - some text </html> "[/CODE] | |
Re: now it will be Swing's complaint (some required changes) [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TicTacToe extends JFrame { private JMenuBar MenuBar = new JMenuBar(); private JFrame frame = new JFrame(); private static final long serialVersionUID = 1L; private JMenu File = new JMenu("File"); private JMenu Help = … | |
Re: crossposted [url]http://stackoverflow.com/questions/6966503/validation-through-jformattedtextfields-in-java[/url] | |
Re: [CODE]revalidate(); repaint()[/CODE] | |
Re: create new logics JScroolPane - > JPanel - > JLabel -> ImageIcon, then just swith Image in JLabel then call revalidate(); and repaint(), nothing else JLabel is in this case better as JPanel | |
Re: I never ever down-voted on all forums where I member of, you are 1st. candidate during this month, are you thinking about that all posters in this thread just wasted her/his time for your ...., everything is wrong | |
Re: as @JamesCherrill mentioned you have to look for Rendered, but that only to display JButton in the JTable, for invoke + Listening expected Action you have to look at TebleCellEditor, that very easy for JComponents as JButton, JComboBox, JtextField, JFormattedTextField, another JComponents required more of ..., examples [URL="http://www.exampledepot.com/egs/javax.swing.table/pkg.html"]here[/URL] and [URL="http://www.java2s.com/Code/Java/Swing-JFC/CatalogSwing-JFC.htm"]here[/URL] | |
Re: at first of all put here [URL="http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html"]Use Formatted Text Fields[/URL] instead of JTestField set NumberFormat for example [CODE]NumberFormat formTextFieldFormat = NumberFormat.getNumberInstance(); formTextFieldFormat.setMinimumFractionDigits(2); formTextFieldFormat.setMaximumFractionDigits(2); formTextFieldFormat.setRoundingMode(RoundingMode.HALF_UP); . .. ... ... JFormattedTextField formTextField = new JFormattedTextField(formTextFieldFormat); [/CODE] don't forget to set minimal ammout [CODE]formTextField.setValue(amount);[/CODE] nothing complicated as you can see (for example) [CODE]import … | |
Re: don't do it this way, that job for prepareRenderer, the best [URL="http://tips4java.wordpress.com/2010/01/24/table-row-rendering/"]examples[/URL] for Swing, btw prepareRenderer covered with its funcionalities [CODE]getTableCellRendererComponent[/CODE] too, don't declare JLabel (if there isn't TableCellEditor), all Renderers in Swing by defalut returns JLabel as J/Component just declare [CODE]setHorizontalAlignment(SwingConstants.RIGHT); setForeground(new Color(181, 78, 93)); .....[/CODE] really working example … | |
Re: 2nd suggestion by @JamesCherrill is correct way re-open and re-use Container, there isn't, btw dispose() works only in Cartoons, only hide COntainer as setVisible(false); nothing else, | |
Re: [URL="http://download.oracle.com/javase/tutorial/uiswing/components/label.html"]JLabel[/URL] is best of ways how to display [URL="http://download.oracle.com/javase/tutorial/uiswing/components/icon.html"]Icon or ImageIcon[/URL] | |
Re: hmmm [URL="http://download.oracle.com/javase/tutorial/deployment/applet/security.html"]What Applets Can and Cannot Do[/URL] | |
Re: that's very good idea, but would be impossible in case that JTable has used RowSorter or RowFilter 1/ if isn't there implemented and used RowSorter or RowFilter, add TableModelListener, 2/ move TableHeader (then you lost) from Top to the JTable's bottom and if isn't there implemented and used RowSorter or … | |
Re: for why reason(s) on this world you needed something as MouseListener in TableCell please check [URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html"]tutorial[/URL] and to try examples for [URL="http://www.java2s.com/Code/Java/Swing-JFC/CatalogSwing-JFC.htm"]JTable[/URL], then ask queston with posting concrete code | |
Re: [url]http://download.oracle.com/javase/tutorial/uiswing/components/applet.html[/url] [url]http://download.oracle.com/javase/tutorial/deployment/applet/index.html[/url] [url]http://www.java2s.com/Code/Java/Swing-JFC/Applet.htm[/url] | |
Re: add some code in Html for Icon in JToolTip, but JTooltip is so terrible Component, check how ToolTipManager works | |
Re: I dont understand your topic is about TableModelListener and your code shows Action from JButton's mouseclick please tell us "What do you really want to" 1/ listening for changes into JTable and any changes would be saved to the databases 2/ save changes manually by clicking to the JButton | |
Re: @Majestics then pass them to constructor as reference == [B]parent[/B] | |
Re: I'm not sure (and i'm against to use Thread.sleep(int)) in Swing code, anyway in your previous thread was suggested somenthig about javax.swing.Timer 1/ look for myTimer.restart(); in your case (KeyListener) 2/ look for KeyBinding, is more confortable than KeyListener 3/ for inspiration, very simple example [CODE]import java.awt.Color; import java.awt.Dimension; import … | |
Re: by defalut java.mail.API supported only ASCII chars, [url]http://stackoverflow.com/questions/4725075/javax-mail-problem-decoding-subject[/url] [url]http://stackoverflow.com/questions/3451256/javamail-changing-charset-of-subject-line1[/url] | |
Re: time to use KeyBinding instead of KeyListener | |
Re: really 288 posts and again and again with empty question, here is your example, please would be possible to demostate your hidden/secret problem on that [CODE]import java.awt.*; import java.awt.event.*; import java.awt.event.ActionListener; import javax.swing.*; //http://stackoverflow.com/questions/2228735/how-do-i-fade-an-image-in-swing/2234020#2234020 public class AlphaTest extends JPanel implements ActionListener { private static final Font FONT = new Font("Serif", … | |
![]() | Re: @hfx642 good question +1 but SpinnerModel has nothing to do with JSpinner' View, there you have to change Font, its size ... to the JButton size(s) that's depend of JSpinner size, or are you meaning triagle JButtons Icon ??? anyway there are two way 1/ extract all JComponents from JSpinner … ![]() |
Re: setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); | |
Re: remove KeyListener, [url]http://www.java2s.com/Tutorial/Java/0260__Swing-Event/ListeningtoJTableEventswithaTableModelListener.htm[/url] | |
Re: down-voting == I'm disagree with your answer, nothing else, up-voting == your answer is excelent, nothing else, then what's matter about points score, talking about nothing on all forums where I member of, only I'm so too long time here, I have deepest knowledge about topics, then I obtain some … | |
Re: @NormR1 javax.swing.timer is correct suggestion, for clarifications, :-) "don't use Thread.sleep(int) in Swing code, don't use Thread.sleep(int) outside Thread, Executor ... :-), because in Swing code block EDT, and if there runs some BackGround Task/Thread/SwingWorker on separate thread then you have to calculate with unexpected output to the GUI by … | |
Re: always you have check before if SubString cursor != or > myString.lenght() |
The End.