AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

getHeight of JPanel returns 0
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
server
Guest





PostPosted: Sat Feb 11, 2006 4:39 am    Post subject: getHeight of JPanel returns 0 Reply with quote



message unavailable
Back to top
hiwa
Guest





PostPosted: Sat Feb 11, 2006 4:39 am    Post subject: Re: getHeight of JPanel returns 0 Reply with quote



Your JPanel isn't visible on the screen.
Back to top
IchBin
Guest





PostPosted: Sat Feb 11, 2006 4:44 am    Post subject: Re: JEditorPane & CSS Reply with quote



Roedy Green wrote:
Quote:
On Fri, 10 Feb 2006 17:18:57 -0500, IchBin <weconsul (AT) ptd (DOT) net> wrote,
quoted or indirectly quoted someone who said :

I found that Opera, Mozilla SeaMonkey, Mozilla Deer Park, IE, and Avant
all produced this error:

which error on which CSS/HTML text?

When I load the code as a xml file I receive error:
XML parsing failed: syntax error (Line: 51, Character: 44)

It points to the first & in this line:
51: <div class="embed" style="background:#cff">&nbsp;</div>

When loading a html file using code as a CSS file
<link rel="stylesheet" type="text/css" href="test.css">

I see the colored layout OK but have a dangling unformatted </html
displayed on the screen.

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Back to top
Roedy Green
Guest





PostPosted: Sat Feb 11, 2006 7:52 am    Post subject: Re: JEditorPane & CSS Reply with quote

On 10 Feb 2006 09:43:43 -0800, "William Z." <Wizumwalt (AT) gmail (DOT) com>
wrote, quoted or indirectly quoted someone who said :

Quote:
html
head
<style type="text/css"

#inline {
float:none;
clear:both;
background:#ccf;
}
.clear {
height:1px;
font-size:1px;
float:none;
clear:both;
}
.embedhdr {
width:100%;
float:left;
}

.embed {
width:10%;
float:left;
}

/style
/head
body

div id="inline"
<div class="embedhdr" style="background:#cff">test hdr</div
<div class="embed" style="background:#cff">a column</div
<div class="clear"> </div
/div

div id="inline"
<div class="embed" style="background:#cff">a column</div
<div class="embed" style="background:#ffc">a column</div
<div class="embed" style="background:#fcf">a column</div
<div class="embed" style="background:#fcc">a column</div
<div class="clear"> </div
/div

div id="inline"
<div class="embedhdr" style="background:#cff">test hdr2</div
<div class="embed" style="background:#cff">a column</div
<div class="clear"> </div
/div

div id="inline"
<div class="embed" style="background:#cff">&nbsp;</div
<div class="embed" style="background:#cff">&nbsp;</div
<div class="embed" style="background:#cff">&nbsp;</div
<div class="embed" style="background:#cff">a column</div
<div class="clear"> </div
/div

div id="inline"
<div class="embed" style="background:#cff">a column</div
<div class="embed" style="background:#ffc">a column</div
<div class="embed" style="background:#fcf">a column</div
<div class="embed" style="background:#fcc">a column</div
<div class="clear"> </div
/div

/body
/html


Problems I see:

last > missing. possibly a copy/paste chopping.

You use id "inline" more than once.

you are missing your semicolons on the end of all your style elements.

You might need meta tags in your header something like:

<link href="../mindprod.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Style-Type" content="text/css">

Possibly you are supposted put doctypes on.

Instead of using background style elements, I would invent two classes
of embed. Then you have centrol control of the two colours.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Back to top
Ian Mills
Guest





PostPosted: Sat Feb 11, 2006 2:57 pm    Post subject: Re: how to put JTextfield and JButton in a cell of JTable Reply with quote

siva wrote:

Quote:
hi all thanks for u r replays

the problem is we need to enter the data in textfield for that
value button as a look up . when click button it wil dispalys a
window.
when click on table cell for editing purpose it will automatically
action on lookup button not on text field,it always allow only one
component as editable

Have you thought of trying a JComboBox and capturing the fact the button

has been clicked and poping up a window instaed of using a JTextField
and a JButton? This would then mean your renderer and editor would
extend JComboBox so hopefully solving your problem.
Back to top
Guest






PostPosted: Sun Feb 12, 2006 12:07 am    Post subject: Re: Best UI books to show off on your bookshelf Reply with quote

GUI Bloopers by Jeff Johnson provides lots of illustrated examples of
good and bad, and some discussion of the principles. Even if you don't
agree with him 100%, it's thought provoking.
Back to top
the Sun
Guest





PostPosted: Sun Feb 12, 2006 11:12 am    Post subject: Re: how to put JTextfield and JButton in a cell of JTable Reply with quote

Hi

Take a look at this:
http://www.jroller.com/page/santhosh?entry=add_button_to_any_tablecelleditor

-
Satish
Back to top
tallintheair
Guest





PostPosted: Mon Feb 13, 2006 10:12 am    Post subject: Re: ToolTipText problem Reply with quote

Yes you can see the tooltip background. But while the tooltip is shown
the rest of the screen is blank. It doesn't lead or trail any white
space.

Apologies that I can't post any code. The program is far too large and
my understanding of it is far too small. I'm hoping that someone has
come across a similar problem

Phil
Back to top
Oliver Wong
Guest





PostPosted: Mon Feb 13, 2006 3:12 pm    Post subject: Re: ToolTipText problem Reply with quote

"tallintheair" <philjhale (AT) hotmail (DOT) com> wrote in message
news:1139822088.839578.280680 (AT) o13g2000cwo (DOT) googlegroups.com...
Quote:
Yes you can see the tooltip background. But while the tooltip is shown
the rest of the screen is blank. It doesn't lead or trail any white
space.

Apologies that I can't post any code. The program is far too large and
my understanding of it is far too small. I'm hoping that someone has
come across a similar problem

You could try making a copy of your project, and ripping out entire
chunks of it until you can reproduce the tooltip problem in a single file,
and then trimming that file down to 20 lines or so. By doing this, you will
accomplish some or all of the following:

(*) Determined where the problem lies yourself.
(*) Gain a better understanding of how the program as a whole works.
(*) Reduced your program to an SSCCE that you could post here if you're
still stuck.

- Oliver
Back to top
Andrey Kuznetsov
Guest





PostPosted: Tue Feb 14, 2006 2:12 am    Post subject: Re: lose request focus Reply with quote

Quote:
I have some buttons on my UI and a textfield.
when the user dont click one of my buttons the focus from the textfiled

you mean surely "do click"

Quote:
what should I add to the method to catch the event(click somewhere in
UI,but not in my object(buttons......)) properly?

just make your buttons nonfocusable

--
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Back to top
Stanimir Stamenkov
Guest





PostPosted: Sun Mar 05, 2006 3:12 pm    Post subject: Re: JWindow resizing flicker Reply with quote

Stanimir Stamenkov wrote:

Quote:
I've made a resizable JWindow class for some of my GUI needs and I'm
facing problem with flicker during the resize
[...]


Here's simple example using JFrame instead (see some description at the
bottom) one may try with:

-----TestFrame.java
//package ;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class TestFrame extends JFrame {

TestFrame() {
super("Test Frame");
setName("MainFrame");
setDefaultCloseOperation(EXIT_ON_CLOSE);
initUI();
}

private void initUI() {
initMenuBar();

Container contentPane = getContentPane();
JDesktopPane workspace = new JDesktopPane();
contentPane.add(workspace, BorderLayout.CENTER);

JInternalFrame iframe = new JInternalFrame("Something",
true, true, true, true);
iframe.setBounds(40, 40, 240, 180);
iframe.setVisible(true);
workspace.add(iframe);

iframe = new JInternalFrame("Other thing",
true, true, true, true);
iframe.setBounds(10, 10, 240, 180);
iframe.setVisible(true);
workspace.add(iframe);
}

private void initMenuBar() {
JMenuBar menuBar = new JMenuBar();
JMenu toolsMenu = menuBar.add(new JMenu("Tools"));
toolsMenu.setMnemonic(KeyEvent.VK_O);

toolsMenu.add(new AbstractAction("Exit") {
{
putValue(MNEMONIC_KEY,
Integer.valueOf(KeyEvent.VK_X));
putValue(ACCELERATOR_KEY,
KeyStroke.getKeyStroke(KeyEvent.VK_Q,
InputEvent.CTRL_DOWN_MASK));
}
public void actionPerformed(ActionEvent evt) {
exit();
}
});
setJMenuBar(menuBar);
}

public void exit() {
System.exit(0);
}

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
initAndShowUI();
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
}

static void initAndShowUI() {
//try {
// UIManager.setLookAndFeel(UIManager
// .getSystemLookAndFeelClassName());
//} catch (Exception ex) {
// ex.printStackTrace(); // continue though
//}

//Toolkit.getDefaultToolkit().setDynamicLayout(true);

JFrame.setDefaultLookAndFeelDecorated(true);

Window mainWindow = new TestFrame();
mainWindow.setSize(480, 360);
mainWindow.setLocationRelativeTo(null); // center on screen
mainWindow.setVisible(true);
}

}
-----TestFrame.java--

This example is what I'm trying to accomplish with a JWindow which
doesn't provide a native decoration and controller for resizing the
window. Using the Metal L&F, the native frame decoration is replaced
with a decoration implemented by the L&F for the frame's rootPane - the
flicker during resizing is apparent. The difference should be sizing
events don't come from the native system but from within Swing.

I've tried commenting out:

//JFrame.setDefaultLookAndFeelDecorated(true);

and setting:

Toolkit.getDefaultToolkit().setDynamicLayout(true);

where during resizing, painting events are emitted pretty often, I
guess - no flickering is visible whatsoever.

--
Stanimir
Back to top
Stanimir Stamenkov
Guest





PostPosted: Sun Mar 05, 2006 3:12 pm    Post subject: Re: JWindow resizing flicker Reply with quote

Stanimir Stamenkov wrote:

Quote:
-----TestFrame.java
[...]
private void initUI() {
initMenuBar();

Container contentPane = getContentPane();
JDesktopPane workspace = new JDesktopPane();
contentPane.add(workspace, BorderLayout.CENTER);

JInternalFrame iframe = new JInternalFrame("Something",
true, true, true, true);
iframe.setBounds(40, 40, 240, 180);
iframe.setVisible(true);
workspace.add(iframe);

iframe = new JInternalFrame("Other thing",
true, true, true, true);
iframe.setBounds(10, 10, 240, 180);
iframe.setVisible(true);
workspace.add(iframe);
}
[...]
-----TestFrame.java--

For a more robust example one may try replacing the JDesktopPane with a
text component inside a JScrollPane so the entire text will be reflowed
and redrawn during a resize:

private void initUI() {
initMenuBar();

Container contentPane = getContentPane();
JTextPane textPane = new JTextPane();
try {
textPane.setPage(new URL("http://www.w3.org/TR/html4/"));
textPane.setEditable(false);
} catch (IOException ioex) {
ioex.printStackTrace();
}
JScrollPane scrollPane = new JScrollPane(textPane);
contentPane.add(scrollPane, BorderLayout.CENTER);
}

Quote:
I've tried commenting out:

//JFrame.setDefaultLookAndFeelDecorated(true);

and setting:

Toolkit.getDefaultToolkit().setDynamicLayout(true);

where during resizing, painting events are emitted pretty often, I
guess - no flickering is visible whatsoever.

--
Stanimir
Back to top
Stanimir Stamenkov
Guest





PostPosted: Thu Mar 09, 2006 10:12 pm    Post subject: Re: JWindow resizing flicker Reply with quote

Stanimir Stamenkov wrote:
Quote:
Stanimir Stamenkov wrote:

I've made a resizable JWindow class for some of my GUI needs and I'm
facing problem with flicker during the resize
[...]

Here's simple example using JFrame instead (see some description at the
bottom) one may try with:

-----TestFrame.java
[...]


Have somebody tried the example and does everybody experience the
flicker? I've found there's no flicker on 2 of around 10 systems I've
tried with and now wonder what's the cause even more.

--
Stanimir
Back to top
IchBin
Guest





PostPosted: Thu Mar 16, 2006 6:12 am    Post subject: Re: GTK+, SkinLF or something else Reply with quote

Jon A. Cruz wrote:
Quote:
Nikolaos Giannopoulos wrote:

In a nutshell what are the ramifications of using your product as the
L&F for a product that will be sold commercially? i.e. some other
open source licenses like LGPL force their license on products that
use them (thus making those products open source - which doesn't work
for us unfortunately).

Actually, the LGPL does not. Things under it can be freely used by other
software, including commercial. The GPL is the more stringent one.

That's one reason why I like GTK+ over Qt.

Anyway...

For info...

http://www.opensource.org/licenses/


Another nice one that does not have the same QT license problem is
wxWidgets. The wxWindows Licence is essentially the L-GPL (Library
General Public Licence), with an exception stating that derived works in
binary form may be distributed on the user's own terms. This is a
solution that satisfies those who wish to produce GPL'ed software using
wxWidgets, and also those producing proprietary software.

It use to be called wxWindows but had to rename because Microsoft had a
problem with that name even though it had been around for some time, 1992.

Its an open source C++ GUI framework.

http://www.wxwidgets.org


--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Back to top
S. MARSOLLE
Guest





PostPosted: Tue Mar 21, 2006 11:12 am    Post subject: Re: NoClassDefFoundError: sun/io/ByteToCharEUC_KR when updat Reply with quote

We found the solution:
it seems that iPlanet 6 is not "JDK 1.4.2 friendly".
take a look at:
http://swforum.sun.com/jive/thread.jspa?threadID=16595&messageID=33844
we just completed the classpath by adding some JDK 1.4.2 new jar files.

S. MARSOLLE wrote:
Quote:
We try to change the JDK version for a graphical Java Web application
(based on ILOG JViews framework).
Everry thing used to work fine on JDK 1.3.1 but when we run on JDK
1.4.2 we have a NoClassDefFoundError.

Server is Sun Solaris,
Application Server is Sun iPlanet 6.0.5.

class sun/io/ByteToCharEUC_KR is normaly hosted by charsets.jar and
the file is in the JDK.

Exception from log file:
[09/Feb/2006:19:45:54] failure (14742): Internal error: servlet
service function had thrown ServletException
(uri=/dt/DTGraphicServlet): javax.servlet.ServletException:
sun/io/ByteToCharEUC_KR, stack: javax.servlet.ServletException:
sun/io/ByteToCharEUC_KR at

com.airbus.dt.servlet.DTGraphicServlet.handleRequest(DTGraphicServlet.java:3
04)
at

com.airbus.dt.servlet.ilogcusto.DTIlvManagerServlet.doGet(DTIlvManagerServle
t.java:233)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:748)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at

com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServl
etRunner.java:919)
at

com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1
061)
at

com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunne
r.java:981)
, root cause: java.lang.NoClassDefFoundError:
sun/io/ByteToCharEUC_KR at
sun.awt.font.NativeFontWrapper.registerFonts(Native Method) at

sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:7
97)
at

sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:
640)
at

sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:53)
at
sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:262)
at java.security.AccessController.doPrivileged(Native Method)
at

sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:256)
at

sun.java2d.SunGraphicsEnvironment.initTerminalNames(SunGraphicsEnvironment.j
ava:1090)
at

sun.java2d.SunGraphicsEnvironment.initCompositeFonts(SunGraphicsEnvironment.
java:856)
at

sun.java2d.SunGraphicsEnvironment.access$300(SunGraphicsEnvironment.java:53)
at
sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:85)
at


sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at

sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39) at





sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27) at
java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
java.lang.Class.newInstance0(Class.java:308) at
java.lang.Class.newInstance(Class.java:261) at





java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:62) at java.awt.Font.initializeFont(Font.java:308) at
java.awt.Font.<init>(Font.java:344) at
ilog.views.IlvDefaultManagerFrame.<clinit>(Unknown Source) at
ilog.views.IlvManager.<init>(Unknown Source) at
ilog.views.IlvManager.<init>(Unknown Source) at
ilog.views.IlvManager.<init>(Unknown Source) at

com.airbus.dt.jviews.DTLogicalViewManager.<init>(DTLogicalViewManager.java:1
23) at



com.airbus.dt.servlet.DTGraphicServlet.handleRequest(DTGraphicServlet.java:2
6Cool at


com.airbus.dt.servlet.ilogcusto.DTIlvManagerServlet.doGet(DTIlvManagerServle
t.java:233) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:748) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at

com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServl
etRunner.java:919) at

com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1
061) at

com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunne
r.java:981)


Kind regards / Cordialement

Sébastien MARSOLLE
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 1 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.