🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.language
10 messages
10 total messages Started by Rob Sun, 21 Jan 2007 02:31
Using the Design mode - Adding controls to a form.
#290
Author: Rob
Date: Sun, 21 Jan 2007 02:31
14 lines
1593 bytes
My aim is to create a front end that could be accessed via a web
page.
I have tried to create applets and forms.

How do you use the swing controls like jText, jRadioButton, jLabel etc 
to produce anything that approximates a form ?

Unlike any other GUI form creator that I have seen before the controls 
go anywhere but where you drop them.   I have used swing containers like 
  Jpanel, JTabbedPanel but they make no difference.


I am experimenting with Jbuilder I have 2005 on a 30day trial, but I 
also own Jbuilder 2 that I got free with an old copy of Delphi.
Re: Using the Design mode - Adding controls to a form.
#291
Author: Paul Nichols TeamB
Date: Sun, 21 Jan 2007 13:00
10 lines
1492 bytes
Rob wrote:
> My aim is to create a front end that could be accessed via a web
> page.
> I have tried to create applets and forms.
> 
> How do you use the swing controls like jText, jRadioButton, jLabel etc 
> to produce anything that approximates a form ?
> 
Answered in the ide ng. Please do not multi-post. It is against the 
Newsgroup guidelines!
Re: Using the Design mode - Adding controls to a form.
#292
Author: Rob
Date: Mon, 22 Jan 2007 13:02
26 lines
2179 bytes
Paul Nichols [TeamB] wrote:
> Rob wrote:
>> My aim is to create a front end that could be accessed via a web
>> page.
>> I have tried to create applets and forms.
>>
>> How do you use the swing controls like jText, jRadioButton, jLabel etc 
>> to produce anything that approximates a form ?
>>
> Answered in the ide ng. Please do not multi-post. It is against the 
> Newsgroup guidelines!


This is not a multi-post as you can see from my header.  I have 
rephrased my question in the hope that I might get an answer that I can 
understand.

Since my local Borders book shop does not hold a single book on Jbuilder 
    (Plenty on the Microsoft equivalent) and since my question was on 
topic I thought I might get some help -  Alas it was not to be.

I did work out the answer (no thanks to you)  you add the JPanel to your 
form you select the layout property and select the XY Layout manager.
then you can put your controls where you like.

How difficult was that ?
Re: Using the Design mode - Adding controls to a form.
#293
Author: Paul Furbacher [TeamB]
Date: Mon, 22 Jan 2007 15:31
54 lines
3066 bytes
Rob wrote:
> [...]
> This is not a multi-post as you can see from my header.  I have 
> rephrased my question in the hope that I might get an answer that I can 
> understand.
> 
> Since my local Borders book shop does not hold a single book on Jbuilder 
>    (Plenty on the Microsoft equivalent) and since my question was on 
> topic I thought I might get some help -  Alas it was not to be.
> 
> I did work out the answer (no thanks to you)  you add the JPanel to your 
> form you select the layout property and select the XY Layout manager.
> then you can put your controls where you like.
> 
> How difficult was that ?

It would be nice if you dialed down the tone a bit.
It doesn't befit a neophyte who is asking for help.

Although you think you have solved the problem, you have
actually compounded it.

You should have already read that you should only use the
XYLayout for initial design.  As Lori and Paul pointed out in the
equivalent of your original post here, you need to learn
about Swing's layout managers.

As for books on JBuilder, yes, there is a dearth of them.
However, the built-in help in JBuilder is sufficient for
using the IDE itself.  Additional info for using the IDE
is available by asking questions in these newsgroups.

In general, books about IDEs don't cover Swing, or
even Java language issues, all that well.  For something like
Swing, you need to either follow Lori's advice
(http://java.sun.com/docs/books/tutorial/uiswing/
and the other link), or browse your Borders store for books
on Swing.


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://info.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Re: Using the Design mode - Adding controls to a form.
#294
Author: Rob
Date: Wed, 24 Jan 2007 11:35
66 lines
3699 bytes
Paul Furbacher [TeamB] wrote:
> Rob wrote:
>> [...]
>> This is not a multi-post as you can see from my header.  I have 
>> rephrased my question in the hope that I might get an answer that I 
>> can understand.
>>
>> Since my local Borders book shop does not hold a single book on 
>> Jbuilder    (Plenty on the Microsoft equivalent) and since my question 
>> was on topic I thought I might get some help -  Alas it was not to be.
>>
>> I did work out the answer (no thanks to you)  you add the JPanel to 
>> your form you select the layout property and select the XY Layout 
>> manager.
>> then you can put your controls where you like.
>>
>> How difficult was that ?
> 
> It would be nice if you dialed down the tone a bit.
> It doesn't befit a neophyte who is asking for help.
> 
> Although you think you have solved the problem, you have
> actually compounded it.
> 
> You should have already read that you should only use the
> XYLayout for initial design.  As Lori and Paul pointed out in the
> equivalent of your original post here, you need to learn
> about Swing's layout managers.
> 
> As for books on JBuilder, yes, there is a dearth of them.
> However, the built-in help in JBuilder is sufficient for
> using the IDE itself.  Additional info for using the IDE
> is available by asking questions in these newsgroups.
> 
> In general, books about IDEs don't cover Swing, or
> even Java language issues, all that well.  For something like
> Swing, you need to eith(her follow Lori's advice
> http://java.sun.com/docs/books/tutorial/uiswing/
> and the other link), or browse your Borders store for books
> on Swing.
> 
> 
OK what I have learnt so far ;

1/You need to stick a jPanel  Swing container. on your form and change 
the layout manager to one of the options in the form properties.

http://java.sun.com/docs/books/tutorial/uiswing/

All the layout managers that I have are good for making 1 x 1 inch 
forms.   None of them are useful for making anything but the most basic 
of interfaces.

The XY layout gives me what I want but does not compile.


So I would like to ask the following questions

1/ The XY layout exists for a reason.  Do I use the coordinates in code 
to produce the form I want.

2/Is there a way to combine the layouts into one forms.


All this to create a simple data entry form.   I am starting to think 
that Java is not the right tool to do what I want.
Re: Using the Design mode - Adding controls to a form.
#295
Author: Paul Furbacher [TeamB]
Date: Thu, 25 Jan 2007 05:29
96 lines
4829 bytes
Rob wrote:

> OK what I have learnt so far ;
> 
> 1/You need to stick a jPanel  Swing container. on your form and change 
> the layout manager to one of the options in the form properties.
> 
> http://java.sun.com/docs/books/tutorial/uiswing/
> 
> All the layout managers that I have are good for making 1 x 1 inch 
> forms.   None of them are useful for making anything but the most basic 
> of interfaces.

Without any code examples from your efforts, it's hard
to tell what you might be doing wrong, but if you are using
JBuilder, you are looking at a Swing app which is only
useful if you have sized it to much more than 1"x1".  In other
words, all the layouts provide for forms, panels, you name it,
of varying size.  That's the whole point of Swing layouts.
They can grow and shrink, and still maintain a sense of proportion.

> The XY layout gives me what I want but does not compile.

It temporarily may give you what you want, but in a cross-platform
world of many resolutions, you really don't want it.  Have you
ever just played with Windows, playing with the large fonts/small
fonts settings?  What happened to text in various locations on
some of your or other apps' forms?  Right, it got cut off.
Same applies to taking your pretty XYLayout on Windows and running
it on a Linux or OS X box.

> So I would like to ask the following questions
> 
> 1/ The XY layout exists for a reason.  Do I use the coordinates in code 
> to produce the form I want.

No, as the JBuilder Help on laying out a form suggests, you
can initially layout the form using XYLayout, but switch to
some other layout before running.  The most appropriate/useful
layout, and also the hardest to learn, is the GridBagLayout.

If you stick with Java, and anticipate doing a lot of Swing
UI work, you owe it to your career to learn the GridBagLayout
well.

(Flashback to 1998, I'm writing the same advice in 2007!)

When I do Swing UI work, which isn't often, I use
the GBL in maybe 99.99% of all layouts.  As soon as I
create a new frame, or new panel, I flip the layout to
GBL; I never use the XYLayout.

An alternative, one which JBuilder does not support in its
UI Designer, is the SpringLayout (thank you NeXT Interface
Builder, now Apple Interface Builder).

An altogether different layout manager is used by the Matisse
UI Designer which is a part of the most recent releases of
NetBeans.  Matisse is probably the best Swing UI designer
available.

> 2/Is there a way to combine the layouts into one forms.

Yes, a form is typically composed of a number of panels.
Each panel can use a different layout manager depending on
how the controls in the panel are laid out.

> All this to create a simple data entry form.   I am starting to think 
> that Java is not the right tool to do what I want.

It may not be.  Do you have any need for being able to
run on other operating systems, or just Windows?  Do you
need other APIs which are standard in Java and not so
readily available in other programming toolkits?  Do you
need any of the far more numerous open source projects
that the Java world provides than say the .NET world?

Those are the questions which should be asked in the
evaluation of whether you should be using Java, .NET,
Win32, or Cocoa (Mac OS X), or ...?


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://info.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Re: Using the Design mode - Adding controls to a form.
#296
Author: Paul Nichols TeamB
Date: Sat, 27 Jan 2007 21:14
16 lines
1876 bytes
> I did work out the answer (no thanks to you)  you add the JPanel to your 
> form you select the layout property and select the XY Layout manager.
> then you can put your controls where you like.
> 
> How difficult was that ?

Well then, since I know I am no longer of any assistance to yo, perhaps 
I will refrain from offering advise.:)

Use the XYLayout if you wish. Just do not try and deply to any other 
Video setup other than your own, and NEVER try to deploy it to another 
OS. You will be sorely dissappointed,  as will your users.

As I explained in the other NG, XY is a prototype framework, period! It 
was NEVER intended for production ready code.
Apology
#297
Author: Rob
Date: Sun, 28 Jan 2007 10:53
34 lines
2186 bytes
Sorry Paul.

I posted on another local server not realising that they were in fact 
hosting a Borland news group.  So I was cross posting and I did not 
realize it - not that was any excuse for my response.

Anyway thank you for your help.   Reading your message again I realise 
that what you were saying was that JBuilder would not allow me to build 
a full interface in a RAD way.  Maybe JBuilder 2008 will.

Sorry again - Have a nice life.


Regards, Rob


Paul Nichols [TeamB] wrote:
> 
>> I did work out the answer (no thanks to you)  you add the JPanel to 
>> your form you select the layout property and select the XY Layout 
>> manager.
>> then you can put your controls where you like.
>>
>> How difficult was that ?
> 
> Well then, since I know I am no longer of any assistance to yo, perhaps 
> I will refrain from offering advise.:)
> 
> Use the XYLayout if you wish. Just do not try and deply to any other 
> Video setup other than your own, and NEVER try to deploy it to another 
> OS. You will be sorely dissappointed,  as will your users.
> 
> As I explained in the other NG, XY is a prototype framework, period! It 
> was NEVER intended for production ready code.
Re: Apology
#298
Author: Kevin Dean [TeamB]
Date: Sun, 28 Jan 2007 19:31
50 lines
3550 bytes
Rob wrote:

>Anyway thank you for your help.   Reading your message again I realise 
>that what you were saying was that JBuilder would not allow me to build a 
>full interface in a RAD way.  Maybe JBuilder 2008 will.

JBuilder will allow you to build full and complex interfaces, with far 
more control over how those interfaces are managed, than you will find in 
most other tools.  I work in both Java and C# and can tell you that C#'s 
TableLayoutPanel is only now giving Windows developers some of the power 
of Java's GridBagLayout.  I've used JBuilder's UI designer for years, and 
while every designer has some limitations that require dropping to code 
once in a while, that has been far less frequent for me in JBuilder than 
in pretty much any other tool.

That being said, JBuilder 2007, being essentially a new product, needs 
some time to get back to where JBuilder 2006 is in terms of UI design.  
The version you have (JBuilder 2005) is still an excellent choice for UI 
design; there's little if any difference in the UI designer between 2005 
and 2006.

>Sorry again - Have a nice life.

The XYLayout was created by Borland to simplify initial UI development, 
and even then only for people new to Java.  It's a way of getting started 
learning about Java and JBuilder but after a short time every competent 
Java developer abandons it for two basic reasons:

1) it's Borland-specific, so you have to deploy the Borland JBCL library 
with your application or ensure that you include the class in your 
distribution; and

2) it's hopeless when it comes to adjusting to different screen 
resolutions, font sizes, and operating systems.

Paul and others were simply pointing out to you a summary of the Java 
developer community's experience in designing rich user interfaces.  
Pretty much the only way to go is the GridBagLayout; it is incredibly 
powerful and I wouldn't dream of developing a UI without it (other layouts 
come in handy from time to time, but most work is done in GBL).  The .NET 
2.0 TableLayoutPanel was a welcome and long overdue addition to the 
Windows world.

-- 
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Re: Apology
#299
Author: Paul Nichols TeamB
Date: Sun, 28 Jan 2007 19:46
28 lines
2227 bytes
Rob wrote:
> Sorry Paul.
> 
> I posted on another local server not realising that they were in fact 
> hosting a Borland news group.  So I was cross posting and I did not 
> realize it - not that was any excuse for my response.
> 
> Anyway thank you for your help.   Reading your message again I realise 
> that what you were saying was that JBuilder would not allow me to build 
> a full interface in a RAD way.  Maybe JBuilder 2008 will.
> 
> Sorry again - Have a nice life.
> 
> 
Rob,

As I explained, RAD GUI Development is possible with Java now, with the 
Maltisse extensions. You can download NetBeans 5.5 and use it. I think 
you will find it works very similar to JBuilder.

I do not know if JB 7 has Maltisse or not. Of course, you can get it 
with Eclipse, by buying the cheap MyEclipse Enterprise package, version 5.

I do not have JB 7 yet, so I cannot tell you how to integrate Maltisse 
into JB 7, or at least not yet. But I do not know that Eclipse does have 
this through the MyEclipse package. There may be a plug in to allow you 
to load it separately, I do not know. It is a code part of Net Beans 5.5 
Swing GUI Builder.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads