tag:blogger.com,1999:blog-4481781585418842840.post5748384935397496239..comments2024-03-24T16:31:02.567+09:00Comments on Java Swing Tips: Translucent JPopupMenuateraihttp://www.blogger.com/profile/07647339065761407369noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-4481781585418842840.post-60151321321219032672012-08-17T15:50:59.573+09:002012-08-17T15:50:59.573+09:00Hi, HANNIBAL
A quality of machine translation(Engl...Hi, HANNIBAL<br />A quality of machine translation(English into Japanese and Spanish into Japanese) is difficult.<br />So I need easy access to SSCCE(Short, Self Contained, Correct Example), but this blog comment system is totally miscast as paste source code...<br />I'm afraid I can't answer the question.<br />ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-59535600754564910462012-08-11T05:08:35.046+09:002012-08-11T05:08:35.046+09:00hola TERAI ATSUHIRO me sirvio tu ayuda gracias,dis...hola TERAI ATSUHIRO me sirvio tu ayuda gracias,disculpa que te moleste tanto,tengo un problema con un JComboBox,te explico en una clase externa tengo un metodo por el cual genero JComboBox asi:<br />public void addComboBox(String[] items, String label,int position)<br /> {<br />JPanel panel_objetos = new JPanel();<br />JLabel etiqueta=new JLabel(label); panel_objetos.setLayout(new FlowLayout(Damianhttps://www.blogger.com/profile/17740993838582151525noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-11181090149830503062012-08-01T20:57:28.882+09:002012-08-01T20:57:28.882+09:00If I understand your requirement you might be able...If I understand your requirement you might be able to use <a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JPopupMenu.html#show(java.awt.Component,%20int,%20int)" rel="nofollow">JPopupMenu#show(java.awt.Component, int, int)</a> method.<br />Here is a example: <a href="http://terai.xrea.jp/data/swing/PopupMenuLocationTest.java" rel="nofollow">PopupMenuLocationTest.java</a>ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-72044901402550388652012-07-31T03:01:14.291+09:002012-07-31T03:01:14.291+09:00Atsuhiro TERAI excuse me, speak Spanish, necesito ...Atsuhiro TERAI excuse me, speak Spanish, necesito llamar a un jpopupmenu con un jbutton y darle la propiedad de que me aparezca el jpopupmenu arriba,abajo,derecha,izquierda espero me puedas entender y ayudarDamianhttps://www.blogger.com/profile/17740993838582151525noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-10901479677976136332012-07-30T14:30:19.112+09:002012-07-30T14:30:19.112+09:00Hi, HANNIBAL.
Excuse me, but what does horn and bo...Hi, HANNIBAL.<br />Excuse me, but what does horn and bone mean?ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-52570107643301573622012-07-29T06:36:07.060+09:002012-07-29T06:36:07.060+09:00Hello TERAI Atsuhiro such, I have a little problem...Hello TERAI Atsuhiro such, I have a little problem I'm really trying to make a JButton that clicking JPopupMenu call me a horn and I can do everything right but I want to address bone up, down, left, right where I want appears the jpopup that's not how hard, and let me know if you can give me a hand on it thanks for your codes, I hope your answerDamianhttps://www.blogger.com/profile/17740993838582151525noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-36572576651988745232012-07-26T17:58:43.618+09:002012-07-26T17:58:43.618+09:00Hi, Rene. Thank you for reporting.
((JWindow)p).se...Hi, Rene. Thank you for reporting.<br />((JWindow)p).setBackground(ALPHA_ZERO); is new feature since java 1.7.<br />if 1.6.0_10 <= java.version < 1.7.0 then we should use(as you say):<br />AWTUtilities.setWindowOpaque(p, false); <br />I will add a comment in the example code, thanks again.ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-82771158982425074032012-07-25T18:27:39.467+09:002012-07-25T18:27:39.467+09:00Hey thats the right way, but what happens if the p...Hey thats the right way, but what happens if the popup is out of mainframe? Then it will be heave weight and it doesnt work.<br />Try to change line <br /><b>((JWindow)p).setBackground(ALPHA_ZERO)</b> with this line<br /><b>AWTUtilities.setWindowOpaque( p, false );</b><br /><br />regards<br />ZaidoRAnonymoushttps://www.blogger.com/profile/06811070454355321191noreply@blogger.com