Print very big JTable

645 byte By ger8a at 2007-9-30 2:26:24
Hi all, i have to print a very big table with 100000 rows and 6 columns, i have put the System.gc() at the end of the print method but when i print the table the print process become too big (more or less 700 kB for page and there are 1048 pages).It is possible to make a pdf of my table and ...

resize and jbutton

230 byte By htundera at 2007-9-30 2:26:18
i have a gridbaglayout, in this layout a button and a jtextfield, how can i make it, that the textfield change his size, if i resize the window?i tried it with GridBagConstraints.fill , but it doesn't work...

how to build skin support guis like winamp,redlight,media player?

285 byte By sekobeya at 2007-9-30 2:26:11
Hi,I want to design a gui.But it will not be like traditional windows gui.It will be like winamp,redlight or media player and i want to add skin support to that gui.Which classes,packages have to i use?Can you give me samples,sources or links...Thank you...

casting of values

799 byte By akb205a at 2007-9-30 2:26:07
i have a problem. i want to return a double value by the division of two integers. the values i am getting is not as expected. for example if the lectureduration =3,and no_of_session =2, i expect to get 1.5 but i am getting 1.0.here are some of the codes.double calculate(){double ...

Code Folding in Java

285 byte By J_Flasha at 2007-9-30 2:25:59
Hi Experts;Do you know anyway to do a code folding in a text component like JTextPane, I've seen Neatbeans, IntelliJ & JBuilder implement it but I dont know how ?Is there any solution, free class or codes to it, thanks.Hope to hear from you all.

Help with Copy function in menu bar

1999 byte By BigBadBurrowa at 2007-9-30 2:25:16
Hi, I'm experimenting adding a cut utility to my app. I've added it to my menubarfinal JMenu edit = new JMenu("Edit");edit.setMnemonic(KeyEvent.VK_E);Action cutAction = new Editting.Cut.CutAction();JMenuItem cutMenuItem = new JMenuItem( cutAction );cutMenuItem.setAccelerator( ...

Setting an accelerator to a JButton

1178 byte By BigBadBurrowa at 2007-9-30 2:25:15
Hi,I'm having some great diffuiculty trying to set an accelerator / key mapping to a JButton. I'd like it show that when i press ctrl-f an action associated with the button is fired. Any suggestions? At the moment i have:JButton find = new JButton(new ImageIcon("images/search.gif"));Action ...

L&F Windows

126 byte By wilsonetoa at 2007-9-30 2:25:09
If i'm using Windows XP and GUI with swing, wahts do I have to do to make it get the WinXP look and feel?Thanks

JTable question

382 byte By speedsticra at 2007-9-30 2:24:58
i need to setup a JTable so that when the program opens, there is a blank JTable with column names and a header, then when users add information that is entered into an array, i need the table to change and include the new data, adding a new row with the information enteredthe information ...

Document

1713 byte By nille40a at 2007-9-30 2:24:52
Hi all!I have a bit of a problem to understand the default implementation of Document (AbstractDocument). What I would like to do is process text and determine which element it belongs to by1. Looking in the context in which the text was inserted (e.g parentElement, siblings etc)2. Looking at ...

recursive background color working except for jcombobox & jbutton

1945 byte By oldmicaha at 2007-9-30 2:24:31
I'll start this as I usually do: I probably missing somethign obvious but...I am trying to setup a gui where all of a JFrames child components change background and foreground color. It seems to be working fine except for my JCombobox (the currently selected item background, not the pulldown), ...

Change font color when appending text

302 byte By pateldwa at 2007-9-30 2:23:46
Hi,I would like to change the font color of the text when I append it to a textarea. I have a textarea listening to two incoming messages that print in the textarea. Basically each text needs to be in different color so they can be distinguished from each ...

Dynamically set font in a JTable cell

1072 byte By rupz112a at 2007-9-30 2:23:45
Hi there,i have a JTable, and a JTCombo box containing all the system fonts available. The JTable is made up of my own class called myCell which can be seen below. I have also implemented my own custom renderer. What i would like to do is when the user selects a new system font, the text that ...

How do I know if a Window is moved ?

378 byte By alexkrisha at 2007-9-30 2:22:45
Hi,Can anyone tell me if a window ( JFrame / JDialog ) is moved from its current location. Like, WindowClosing, WindowDeActivated is there any listener for Window Move ?My Requirement : I am displaying a JWindow on a JDialog, When the JDialog is moved, I need to move the JWindow relatively. Any ...

Problem with JTree

202 byte By steve_costina at 2007-9-30 2:22:30
I am trying to expand a node in a JTree programactically when a class is constructed. I can see it expand it, but it immediately collapses it again.What could the problem be?Thanks.

LOL... Text Area Text Area Text Area

402 byte By Mordana at 2007-9-30 2:22:21
First time I come here asking a question about Text Areas and what I see? a forum full of threads just about that!! lolanyway more to the point:I have a JTextPane in a JScrollPane, how do you make sure you always see the bottom of you TextPane?On some occasions when I append text to the Pane, ...

JComboBox as editor in JTable

858 byte By Nilesh_Boradkara at 2007-9-30 2:22:11
Hi,I have used JComboBox as editor for cell in one of the columns in JTable.And to that JComboBox I have set the Editor by extending the BasicComboBoxEditor class in which I used JFormattedTextField as an editor. ie I have set the JFormattedTextField as an editor for JComboBox and then ...

Internal Frames

81 byte By JTeena at 2007-9-30 2:22:08
How do I get internal frames to look like the ones in Netbeans or Eclipse?

can a JApplet have a main method ?

119 byte By weeshmana at 2007-9-30 2:21:39
I'm trying to run an application in a JApplet but it is not recongizing the main method. what do I need to do?

Image objects

433 byte By @rmingjsda at 2007-9-30 2:21:21
Hi to All!!I've created an image within a BufferedImage object, but now I want to scale it and send it to printer. I've tried to do this by the GetScaledInstance method and it works, but the problem comes because the method returns an Image object, and I can't send the Image object to the ...

How to determine preferred size

529 byte By baddog2a at 2007-9-30 2:21:07
I have a custom ToolTip which is displaying a JTextPane. The JTextPane contains HTML formatted text. How can I best determine the preferred size for the JTextPane and for the JToolTip? The HTML text needsto be word wrapped on the JTextPane - which is why I am setting the preferred size on the ...

make JWindow draggable

74 byte By codecraiga at 2007-9-30 2:20:57
I was wondering how I could make a JWindow draggable?thanks.

help in test fields

547 byte By chilukaa at 2007-9-30 2:20:46
I am trying to insert a string in to a textfield with black as the foreground color. Then i am trying to highlight a single character in the string with a different color, ex:blue.below is the code i am using but unable to get the character ...

JTable - Check for unsaved changes

254 byte By jdkirbya at 2007-9-30 2:20:17
Can anyone assist me on how I can check for whether there are unsaved changes in a JTable? I am trying to code the table check into a internal frame close event and not sure how to access the table to find out whether it contains any unsaved data.

zoom (setViewPosition) not working for java 1.4.2

1792 byte By garyc12345a at 2007-9-30 2:20:10
I created a JScollPane with a RenderableDisplay.I programmed a zoom function by adding a mouselistener to the RenderableDisplay. Right click..zoom in..left click..zoom out.All works fine with java 1.3.X. Nothing happenswith java 1.4.X. I traced the problem to the setViewPosition method of the ...

Print JTable

94 byte By devesh67a at 2007-9-30 2:19:49
Hello can u give me a code to print a JTABLE. i HAVE A PROBLEM WITH MINE. THANKS

Highlighting nodes in a JTree

100 byte By franmorenoa at 2007-9-30 2:19:45
how can i do this, which object in the tree recibe Mouse or MouseMotion events?Thanks!

Using Swing Timer in Applet

339 byte By vwuvancouvera at 2007-9-30 2:19:44
I start a timer in the applet init method and restart/start the timer if it is not running in the applet start method. Since the start method is invoked by anther thread, it can run before the init method is completed. That is an undesired situation. What is the better way to handle the timer ...

Xlib: unexpected async reply on Linux :URGENT

289 byte By vkt1977a at 2007-9-30 2:19:13
I am trying to launch my Java Swing Application .But getting the error Xlib: unexpected async reply on Linuxand sometimes java dumps saying some issue with ImageICON which i am creating in Global Scope.Can anyone help.pleas reply to vinaya.kumar.t@hp.com

empty JTable

2314 byte By krrajesh2a at 2007-9-30 2:19:12
I have a JTable whose values gets filled only dynamically.At times, when the table is empty, I want to show a message like "no records found" just under the table header.Just like how in windows machine, when you make a search and if it doesntreturn any records, it prints "Search is complete. ...

Toolbar with groups

357 byte By genepia at 2007-9-30 2:19:11
Hi,I want to create a toolbar where the user can select the group of tools visible. Something like this: http://doc.trolltech.com/qq/qq07-qt32-an-even-better-qt.html#newtoolboxwidgetAny idea how I can do it? Or screenshots of Swing toolbars with similar functionalities? How to manage horizontal ...

Change labels icon - not appearing

686 byte By codecraiga at 2007-9-30 2:18:59
Hi,I have a JLabel with an icon that is clock. After an event occurs, I want to change the icon of the label to a calendar. (logically, doesnt make sense..why a clock/calendar...its an example).Anyway, when the event occurs, I do this:label.setIcon("mycalendar.gif"); label.repaint();// i also ...

JTree and JTable combination

387 byte By Exclama at 2007-9-30 2:18:28
hi!how can I create a JTree and JTable combination(if it is one), as it is used in programs like Shareaza or eMule?i want to have a folding jtree that can contain more informations, e.g. graphical download status elements or extended file information. Can you give me a sample sourcecode for ...

Writing a simple XML editor

263 byte By blue_harvestera at 2007-9-30 2:18:16
I need to write a simple XML/SVG code editor for my application. I basically want to display the contents of an XML DOM so that if the user changes the text in the editor the DOM will be updated to reflect this.What would be the best way to do this?

JMenu

280 byte By javanuia at 2007-9-30 2:18:11
I have an application that uses JMenus. The problem is that the menu items get hidden behind a JFrame. I think this is due to the lightweight/heavyweight component problem. Is there anyway to get the menu items to appear on top of the JFrame and not get obscured behind it.

How to detect a combination of pressed keys

535 byte By ica78a at 2007-9-30 2:18:09
Hello all,hope somebody can help me with this one.I have a JTextArea on which I registered a KeyListener. Now, in case there is pressed a combination of keys (e.g. CTRL-C) I want to redirect this to a log file. Otherwise the pressed key has to be shown in the textarea. I noticed that the C is ...

have any idea in..........................

149 byte By simbra1a at 2007-9-30 2:17:45
Hidoes anyone know how to take a string from a textfield and display the data of the textfield on another page.thanks in advance

Mapping String to image

354 byte By pateldwa at 2007-9-30 2:17:33
Hi all,I want to send an Emoticon (image) to a user in my instant messenger. I have the statement (chat.sendMessage) for sending the message. But im not sure how to link the text to fire the image. Example:user types.... :) and smiley.jpg gets sent. How do I make the link ? can some one show ...

Help please

2264 byte By Follyaxela at 2007-9-30 2:17:19
I've got a JTable...the first time this table gets filled everything goes fine... I do this by callingMyTable = new JTable(rows, col);rows and col are Vector's.The rows and col gets filled by data out of a database.... I'll do this like in the next codewhile(MyResultSet.next()){for(int j = ...

HTMLDocument.getText() issue: HTML tag is translated to ' ' (space)?

745 byte By ovrubla at 2007-9-30 2:17:08
HTMLDocument.getText() issue: (HTML.Tag.BR) is translated to ' ' (space), but I've expected the '\n'!I have the HTMLDocument that contains <html><body>SOMETEXT</body></html>The JTextPane is perfectly showing this formatting, but after I translate the HTML to plain ...

Tricky problem. Change button name with each for-loop

1258 byte By johnnyhall81a at 2007-9-30 2:17:06
Hi all,I would like to implement a 'for loop' to add buttons to my panel depending on the value of max_number.The postion of these buttons will also change with each passing of the loop.The code below implements this. But when I click the buttons they only return the action listener of the ...

Noting edits in a JTable cell

453 byte By lee1112a at 2007-9-30 2:17:05
Hi, I was wondering if somebody could tell me what exactly i need to include to be able to note edits in a JTable cell.I have a JTable which uses JTextArea as an editor. When a user edits a value in a cell, i want to be able to note the cell which was edited, and retrieve the text from this ...

changing the color of node in a JTree

156 byte By senthilpsa at 2007-9-30 2:17:04
is it possible to change the color of the text of a particular node in a tree.for that do we need to implement our own cell renderer for tree?

Draw Lines..!

1054 byte By buttspa at 2007-9-30 2:17:03
Hello ..!Well i have got a little problem, i want to join different Jbuttons using lines (drawLine). I have a JFrame in which i have different JTabPanes. In one of the Tabs there are 2 pannels and on the first Panel i have got 5 buttons. (arranged using '****dummyPanel.setLayout (new ...

Send mail using Java

217 byte By ArpanaD.Na at 2007-9-30 2:16:53
Hi all,I have a send mail button in the application and on click of which i need to open the New Message dialog of the Microsft outlook. Can anyone help me with this.Thanks in advanceArpana

JTable cell Editing

299 byte By venkatbalajia at 2007-9-30 2:16:31
Hi all,I have to edit a JTable in such a way that when a cell is in selected mode the data alreay in that cell should be cleared.If it is in editable mode then the data should be appended not cleared.Plz tell me how to solve this?Thanks &

addMouseListener with Array

1282 byte By IceMan7255a at 2007-9-30 2:16:24
I add JLabels to my GUI at runtime. If user clicks on one of the JLabels, I wan to remove it. I was able to get this to work using individual JLabels, but not when I'm using an array of them.JLabel label[] = new JLabel[20];....//label_count is a running counter of how many labels I have on ...

JscrollPAne and set position of Scrollbar problem

922 byte By tp78a at 2007-9-30 2:16:18
Hi,i have a myScrollPAne which include the textArea. I put the txt file into textArea. Problem is, that after i put the file into textArea the Vertical Scrollbar ' position is placed in max position i need to set it to value 0 , butmySrollPane.getVerticalScrollBar().setValue(0) doesn't ...

Quick question: JFileChooser mode

964 byte By cocoha at 2007-9-30 2:16:11
Hello All,I have a bit of a problem regarding JFileChooser. My application has 1 main window, and subwindows which are created when certain actions are performed on the main window. I want to create a file chooser when I perform certain actions on one of the subwindows, and make that chooser ...

how to refresh a jframe?

193 byte By fungeea at 2007-9-30 2:15:13
im currently facing a problem that is how to refresh d from whenever a user cancel the operation?what is dispose?my second question is how to print jtable in a frame?thanks