 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rich Wahl Guest
|
Posted: Tue Aug 24, 2004 9:01 pm Post subject: mySQL Database to a TextArea? |
|
|
I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).
My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.
Is there a documentlistener or outside source that I can get that kind
of formatting? Would really make this program look nicer and not rely
on the length of names and spaces.
Thanks in advance.
|
|
| Back to top |
|
 |
Lee Fesperman Guest
|
Posted: Wed Aug 25, 2004 12:14 am Post subject: Re: mySQL Database to a TextArea? |
|
|
Rich Wahl wrote:
| Quote: |
I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).
My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.
|
Use a fixed-width font (monospaced) and space filling in the TextArea.
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
|
|
| Back to top |
|
 |
Rich Wahl Guest
|
Posted: Wed Aug 25, 2004 6:13 am Post subject: Re: mySQL Database to a TextArea? |
|
|
Lee Fesperman <firstsql (AT) ix (DOT) netcom.com> wrote
| Quote: | Rich Wahl wrote:
I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).
My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.
Use a fixed-width font (monospaced) and space filling in the TextArea.
|
That wouldnt doesnt work since the names and values I will be reading
in from the Database are all of different lengths.
Or is there a way to have a text area start at a exact position? I
havent done much work with formatting within a textarea...
|
|
| Back to top |
|
 |
Lee Fesperman Guest
|
Posted: Thu Aug 26, 2004 2:52 am Post subject: Re: mySQL Database to a TextArea? |
|
|
Rich Wahl wrote:
| Quote: |
Lee Fesperman <firstsql (AT) ix (DOT) netcom.com> wrote
Rich Wahl wrote:
I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).
My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.
Use a fixed-width font (monospaced) and space filling in the TextArea.
That wouldnt doesnt work since the names and values I will be reading
in from the Database are all of different lengths.
|
Your description was vague, so I gave a solution putting everything in a single
TextArea using space filling to line columns up. That will work!
| Quote: | Or is there a way to have a text area start at a exact position? I
havent done much work with formatting within a textarea...
|
Perhaps, you should try your question on comp.lang.java.gui, because it is not actually
database related.
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
|
|
| Back to top |
|
 |
|
|
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
|
|