I am failing to manipulate the basic co-ordinates while drawing imagesin applets..can anyone please suggest if any gud docs ..i m confusing between teh cordinates and width height measurement..can anyone suggest something..I knw this is height of stupidity to ask help for this..but i m failing to ...
509 byte By
flexeda at 2007-11-27 11:18:14
Hello all,There is a standard JTabbedPane:tabs = new JTabbedPane();tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);Say, I have 20 tabs. Visible from 3 - 7 tab.Now:tabs.setSelectedIndex(15);Nothing happends. I haven't seen any ensureVisible or something like that method. Is there any ...
<p>How do I make the thickness of the borders from createRaisedBevelBorder() a little bit thinner? Sample code please.</p>
301 byte By
Oleka at 2007-11-27 11:18:18
Hi,I want to merge two Colors in a JTablecell. The only way i know is to use a Graphics2D-object and use AlphaComposite-rule ... but this is quiete difficult when using a nomal TableCellRenderer.Are there any other solutions?regardsMessage was edited by: ...
606 byte By
cup_joea at 2007-11-27 11:18:27
Hi there,I have 2 or more main classes in a java project. How do I create more than one application entry point in my MANIFEST.INF? I create my jar file from my java project using Eclipse, and it asked me to "Select the class of the application entry point". I was only able to select one main ...
I have had trouble getting a scrollbar working in netbeans 5.5.1 because the code is not all self written the new 5.5.1 platform takes away the need to write as much code. As a result the books that I am using as a reference does not work.Can anybody provide me with a an example of scrollbar script ...
Hello there..i am in msn communities where you can have someone look over your hijack..this and that..anyways..i had Judy hijack for me..and she said to uninstall Java..well when i went to add and remove programs..there is no remove button..She thought i should ask you experts over here what to ...
623 byte By
jcoder2a at 2007-11-27 11:19:04
Is there any way to check a file is being used by another process outside JVM ?Here is the problem that I run into it when trying to write over an existing file.1.check if the file exists.2.If it does, delete it.3.Rewrite with the same file name.The problem is if another process uses the same file, ...
179 byte By
Gabia at 2007-11-27 11:19:16
<p>Hi All,</p><p>i have a table with a few column's.</p><p>i have to know the visible size (actually the width) of each one of them.</p><p>how can i get this value?</p><p>TIA</p>
1421 byte By
Hanz_05a at 2007-11-27 11:19:19
I have a simple program that will play the wav files when executed. But the sound doesnt play. Here is the codeimport javax.swing.*;import java.awt.*;import java.net.*;import java.beans.*;import java.io.*;import java.applet.*;import java.awt.event.*; public class test extends JPanel{public static ...
287 byte By
Bizoa at 2007-11-27 11:19:21
<p>Hi</p><p>i Have a way to catch the minimize event by using</p><p>InternalFrameAdapter.internalFrameIconified()</p><p>but this event invoked when the internalFrame is already minimized.</p><p>Any1 knows a way to catch the event of the click on the minimize button?</p><p>thanx, tal</p>
<p>I need to make a program that can read and write to a socket and connect to a database. Can I use applet for this? I've heard that applet have some limitation.</p><p>thanx</p>
Hello everyone,as you might have already recognized, setSelected() of JPopupMenu does not what one expects, i.e. selecting the passed component. Instead, the first element stays selected.I was able to workaround the problem. My workaround is actually a hack, but it works from 1.4 to 6.0: I am ...
278 byte By
cutouta at 2007-11-27 11:19:41
<p>am working on a swing desktop application</p><p> and it is very important to me to have </p><p>a JTREE in it but the problem is how </p><p>to make this tree from <b><u>right to left</u></b> </p><p>not the default from left to right</p><p>plz help </p><p>thanks in advance</p>
3216 byte By
BastiMa at 2007-11-27 11:20:26
Hey folks, i created a softkeyboard cosisting of jButtons. The buttons are colored with a transparent bright-red. So far so good, everything works. But when i do a mouseover over the buttons, I get very strange graphic errors. Here are screenshots:before ...
Hi am currently programming a game similar to point and click adventures like monkey island, just one thing is really starting to bother me at the moment, just when i am programming and i import some files more jar files get added too the library drop down menu of my project.I was just wondering on ...
Hi everybody,This isn't technically a problem, just something weird going on with my JFrame that I don't quite understand. My JFrame has a JLabel added to the north panel, and a JPanel with 3 JButtons in a 3-column GridLayout added to the south panel. When the frame renders, the little gray ...
<p>Hi,</p><p>I have close button on my frame.I dont want to use System.exit(0) to close the window.</p><p>I want to close only my window,If I use System.exit(0),its closing the whole application.How can I do this in the listener.</p><p>thanks.</p>
227 byte By
leonaa at 2007-11-27 11:20:43
<p>I have a new computer with Vista Home Edition. Every time I run an application that stitches photos for me now crashes when trying to display with Java! Is there a fix for this Java and Vista issue?</p><p>Thanks SO much!</p>
HiI have a java applet called CheckerBoard.javaIt fails to run and it gives me errors. These errors are pasted as below and the code is pasted below that.load: CheckerBoard.class is not public or has no public constructor.java.lang.IllegalAccessException: Class sun.applet.AppletPanel can not access ...
215 byte By
GooNa at 2007-11-27 11:21:19
<p>I have a JLabel in a JPanel in a JScrollPane. I want to add a MouseListener to the JLabel, but it's not working. </p><p>I can add a MouseListener to the JScrollPane, but not the JLabel for some reason. Help!</p>
<p>If I use a JComboBox as a cell editor in a JTable, is there a way I can use the .getSelectedIndex(); function on that editor? Also, with a JCheckBox as the renderer, How would I use the .isSelected(); function? Thank you!</p>
I had a strange problem of displaying appltes on Windows.Problem:If you go to the link : http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html, the "hello world applets" should be displayed well. However, if you scroll the page down to make the applets invisible in the web page, ...
<p>Is anybody know how to canceling event ?</p><p>the case is like this :</p><p>user click the [x] button on the top right of the windows. it will return an close event right? and how do we cancel it ? (cancel the close event)</p>
<p>Hi,</p><p>For my application , i want to disable right click option in jtextfield.I designed using net beans. Cut,copy,select all,paste menus in popup is showing automatically when i right click it.Please help how to disable</p>
<p>Hi, I was wondering how one can generate more JComboBoxes/JTextField with a touch of a button.</p><p>Also, how you can read the data from those boxes? Since they obviously can't be initialiated the normal way, how can you read the data from them?</p><p>Thanks in Advance.</p>
4749 byte By
Zorama at 2007-11-27 11:22:28
Sir,In my application, when I run it, it shows the frame with three tabs, like -- swatches, HSB, & RGB. I want my application to show only the RGB part. What should I do, please help me out.What can I do so that my application shows only the RGB and not the other tabs.Here's my codeimport ...
If you go to the link : http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html, the "hello world applets" should be displayed well. However, if you scroll the page down to make the applets invisible in the web page, and then scroll back to make the applets visible again. The ...
Hi skilled,At our project we use an Applet that resides in the iFrame. On the main page the iFrame is used to show an Applet.There is a table with two cells, there is DIV in every cell with IDs div1 and div2 accordingly. The iFrame is in the "div1".When we move an iFrame from div1 to div2 using the ...
is it possible to access a bean in servlet ?if yes ...please solve my problemi am trying to access a form data from html page..simple form <form method="post" action="Beanservlet" ><input type="text" name=username ></form>BeanServlet.javaimport java.io.*;import javax.servlet.*;import ...
in our company we've got a jaws screen reader.He doesn't read a HTML content of a JEditorPane.I've used J2SE 1.3.1 and 1.50, Java Access Bridge 1.0.2 und 2.0.1and Jaws 4.51 and Jaws 6.20Can somebody tell me how it works?Here my code://in a JFrame GridLayout l_GridLayout = new ...
Have implemented JTree treePanel using DefaultTreeModel.Created popupMenu.Created JTextArea output.In the end of createPopupMenu() method add following:treePanel.addMouseListener(popupListener);output.addMouseListener(popupListener);Result: Popup added to JTextArea and didn't add to JTree.(When I ...
1875 byte By
ardmorea at 2007-11-27 11:25:29
Thanksimport java.awt.*;import java.awt.BorderLayout;import javax.swing.*;import java.util.Hashtable;import java.awt.event.*;import javax.swing.event.*;import java.applet.Applet;public class Combox extends JApplet{ ...public void init() {try {SwingUtilities.invokeAndWait(new Runnable() {public void ...
Hello All,In the below code, I am trying to have Text area and button in each cell of the table. Problem: - When I type something in the cell, the value is not set there. - When I click on another cell, the previously typed values get copied.Any ideas how to solve this?Thanks for your help in ...
468 byte By
MadAnta at 2007-11-27 11:25:46
Hello all.I'm using a JTextArea, and whenever I add text, it doesn't autoscroll to the bottom of the window, so as to display the just-inserted line.I looked for a field or method for this, and thought setAutoScroll was what I needed, but it wasn't the case.Does anybody know how I could get the ...
<p>Hi,</p><p>Is there any way to make a JTextArea automatically increase in size (vertically) so that text doesn't go off the bottom of it if too many lines of text are being displayed?</p><p>Thanks.</p>
<p>I am relatively new to the java swing package and am trying to create an application that requires an int as an input. I was wondering if there is an object that acts the same way as a JTextField but only allows ints as input. Thanks in advance to anyone who can help.</p>
295 byte By
ktcoxna at 2007-11-27 11:26:26
<p>I am wondering if there is a .jar existant that ports the Java SE 6 Table classes into SE 5 by any chance? Or is there a relatively simple way to create such a port? I am looking to port some existing SE 6 code over to 5 and would love to utilize the additions to tables in 6 if possible.</p>
hello all,i'm not unable to type "`" (anti quote) with my sun keyboardtype 6 (azerty).My configuration is:- Sun Ultra 20 - Solaris 10 U2- SRSS 3.1 with many patches- Sun keyboard type 6 azertyWhen i log directly on ultra 20, everything works perfectly, but i'm using Xorg.When i'm logging thru ...
Hello Friends,I have a query on the JDK version.I am working in a core java application where present server is residing on NT. Now it is shifted to Windows 2003. It is an applet which is running on the client's applet viewer, install the jar files from the server and hit the server when ever ...
298 byte By
frknmla at 2007-11-27 11:26:51
<p>I want to get value from table.I tried like that</p><p> mystring=dsk1.klm.Table_Grid.getModel().getValueAt(row,column).toString();</p><p> and it gived this error:Exception in thread "Thread-3" java.lang.NullPointerException</p><p>is there a way to get value from table?</p><p>please help me!</p>
<p>Is it possible to open up a IE or firefox etc. browsers which will list all the files in the specified URL when a JButton is clicked.</p>
In my JTable, I need to change the appearance of the line between two cells (either making it into a dashed line or just changing the color, the latter probably being easier). I am currently planning to turn off the JTable's grid lines and paint my own grid lines with a custom TableCellRenderer. ...
Hello,I am having a problem trying to package my image files into a JAR file. I can successfully run my program with the image folder in the package directory. But, when I put the directory tree into a JAR file, suddenly the program cannot find the images anymore. I am using the ...
I have a program that uses an ObjectOutputStream to write some files,I was previously using 6u1, when I updated to 6u2 my program fails to load the files outputted by 6u1.Any newly created files using 6u2 work fine though, it just cannot read 6u1 created files. I am afraid if I just start over it ...
Hi Guys,How to Identify that we are dragging the mouse on the JTree ?I have this intrigue problem where i need to identify whether the user is clicking or dragging on the tree. Based on that result I need to select some other row in the tree table.Is there a easy way to do itPlease help-nice ...
Hello,I want to find a way to add JCheckBox objects to the drop-down list in a JComboBox. When I expand my JComboBox, I want to be able to see my JCheckBox objects and select/deselect them. Here's my SSCCE. Apart from this, I have also tried using a JPopupMenu to put the JCheckBoxes in and add the ...
896 byte By
Janioa at 2007-11-27 11:28:16
HelloI made a JTable with various columns, each column have a different Renderer and Editor. One of the columns is render with a JTextField. Now I must make a different thing: when I Select the option 'Date' in one of the JComboBoxes that is part of Table, the JTextField is substitued by an ...
Hi everybody,I'm running into a problem with some code, trying to have something stop running when a window closes. However, whether I use windowClosing or windowClosed, it never seems to work. I can't figure out why, can someone help me out?Here's a really small program that shows what's going ...
<p>I need the verticle scroll bar to automaticly scroll down (when needed) when a new line is added. This is probably really simple but I still can't find how. =[</p>