About layout in netbeans
Hii,
I'm using Netbeans IDE for developing swing gui. which layout should be choosen, could anyone please suggest me!!!
thanks
Dev.
dev wrote:
Hii,Helloooooo. If you fix that sticky 'i' key, I'll look into fixing my sticky 'ooooooo' key.
..which layout should be choosen, could anyone please suggest me!!!In addition to what Darryl was saying, note that it is rare that a real world main GUI will use just one layout, but instead layouts within JPanels that are in turn, inside other layouts. Typically refered to as a nested or compound layout. This technique allows you to mix-n'-match layouts across the interface as needed.
And also please look into the sticky '!' key.
Similar Messages
-
The problem about drawing using netbean GUI?
I am new to netbean gui,
I creat the JFrame through netbent gui, but I do want to draw something in it, so I creat the WaveformPanel class, which extend the JPanel class,in which
I will do some drawing, using paint method.
so then I drag the button from the platte, and want to click the button, then the drawing will appear, in the actionperformed method, my code is
JPanel wavepanel = new WaveformPanel();
super.setContentPane( wavepanel);
super.setVisible(true);but in this way, the drawing will cover all the Frame, that is not what I want , how to draw it just in the right buttom, how to do it?
I know for this code I have not drag the JPanel from the platte, I just do not know how to connect the JPanel from the platte and my created JPanel, any idea�HAndre_Uhres wrote:
Do not use setContentPane. Try like this:
getContentPane().setLayout(new BorderLayout());
wavepanel.setPreferredSize(new Dimension(150, 0));
getContentPane().add(wavepanel, BorderLayout.EAST);
You may also want to read about [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html] .
As has already been explained to Danielwang in his cross-post here: [http://forum.java.sun.com/thread.jspa?threadID=5296704|http://forum.java.sun.com/thread.jspa?threadID=5296704]
Danielwang: when you cross-post like this, you waste both Andre's by having him answer questions already answered and you waste my time by making me feel like I spent time creating an answer that you never read and never responded to. If you keep doing this, you will likely be put on our lists of people not to help. Not a good way to start here. -
About Layout in Report builder 10g
Hi All
I am new for report, can any one help me for clearing the concept on repeating frame in rdf.
if my query is master detail how to i design my layout.What about reading the manual first.
http://download.oracle.com/docs/cd/E12839_01/bi.1111/b32122/toc.htm -
I want to know critics about Layout Mode
Hi,
I want to know critics of Layout Mode feature in DW. Seems
like a wonder tool to me, and apparently solves many of the
problems i had when laying out pages, all you have to do is drag
and drop tables or cells here and there and add content to them!
Is there any disadvantage or inconvenience with this
approach? Why isn't it the typical workflow in town (CSS seems to
be the dominant approach, despite obvious more steps and workforce
than layout mode).
Thank you in advance for your opinions, i appreciate.Hello,
If the web were static like print media, layout mode would be
fine.
In many graphics applications like Photoshop, you can drag
elements (layers)
around until you get your design exactly how you want it.
Then, you simply save your design in whatever image format
you'd like. All
of the layers are merged into one, static image,
All of the parts have merged into one element, no longer the
multiple parts
you were dragging around.
When a user sees your image, either on a piece of paper or on
their computer
screen, it looks the same to everyone.
Overall, it might be bigger or smaller in whole dependant on
print size or
monitor resolution, but the layout itself can't change.
A web page, unless the page is one giant image, remains
multiple parts after
you publish it and some of these parts the user can change,
such as text
size.
Any area of your design with text in it will look different
on their screens
than on yours, but the images won't change size.
This is how the web works, and this is where layout mode
fails.
As you drag things around in layout mode, DW writes code to
try to keep the
elements exactly where you want them in relation to other
objects.
It merges cells which fills the code with colspans and
rowspans, and it adds
spacer images by the tens or hundreds in an effort to keep
everything "stuck
together" exactly where you dropped the elements.
The more things your drag and drop, the more complex the
code.
When you are done, your layout looks like you want it to on
your screen but
behind it is code that is very fragile and cumbersome.
With this code, if any part of your layout changes size in
someone's browser
(like a text area), everything else in the layout that is so
tightly tied to
it
will be affected as well.
This usually results in things shifting and not lining up any
more, the page
"breaking" and filling up with gaps and misalignments
throughout the page.
The one change ripples throughout the whole page, because
every element is
so tightly connected by the code Layout Mode wrote.
In essence, Layout Mode wrote such stringent and unforgiving
code that your
design will only work reliably at 1 text size and 1 browser
viewport size.
Those sizes are the sizes your browser was set at when you
designed the
page.
Think of it this way.
You have 100 playing cards and you lay them out on a table in
10 rows of 10
columns each.
You make sure all of the edges are touching.
It's a nice, tight layout.
On one of the cards in the center, you write some words in
marker.
If you saved this as an image, it would look the same to
everyone.
A hundred cards with all the edges touching and text written
on one of them.
If someone enlarges the image to read the text on the single
card, all the
other cards grow equally and the layout looks exactly the
same, only bigger.
However, if you saved this as a website and someone enlarges
the text to
read it, only the card with the text gets bigger.
All the others stay the same size. But you wanted all the
edges touching.
You'd like to keep as many cards as neatly arranged as
possible, but layout
mode doesn't care about that.
It's trying to keep every card edge touching, just like you
did when you
dragged and dropped them..
What happens to the neat rows and columns of cards if the
single card with
text on it doubles in size?
Cards all around it move and nothing lines up anymore. Gaps
appear between
every card.
Changing the size of that one piece of the layout ripples
through the rest
of the page because of that really complex, cumbersome code
Layout Mode
wrote. It really wants to keep everything just like you
wanted it, all the
edges touching and it doesn't care what the layout looks
like.
If you had used standard mode instead of layout mode, the
page would be
dynamic in that the elements (the cards) can freely flow in a
logical manner
under different user's settings.
When this single card doubles in size, the group of cards
above wouldn't be
affected. They would stay neatly arranged in rows with all
their edges
touching as would the group of cards below the enlarged card.
You'd keep a nice, neat layout of cards with just one row of
cards in the
center taller than the other rows because of the single
bigger card.
Instead of being filled with gaps and misalignments all over
the place that
Layout Mode's code caused, the page would still look good.
Layout Mode wrote such bad code as it tried to keep a layout
static in a
dynamic environment, that it has been removed from
Dreamweaver.
Here's more very good info, including a graphic example of a
common problem
Layout Mode creates for the unsuspecting....
http://apptools.com/rants/spans.php
There's something arguably as bad as layout mode you should
also stay way
from.
They, too, offer the ease of drag and drop but at a huge
price when you
realize all the troubles and then have to completely rebuild
your site.
Please read this:
http://apptools.com/examples/pagelayout101.php
Particularly, the section entitled "The trouble with layers"
(AP Divs)
Take care,
Tim
"mballom3" <[email protected]> wrote in
message
news:[email protected]...
> Hi,
>
> I want to know critics of Layout Mode feature in DW.
Seems like a wonder
> tool
> to me, and apparently solves many of the problems i had
when laying out
> pages,
> all you have to do is drag and drop tables or cells here
and there and add
> content to them!
>
> Is there any disadvantage or inconvenience with this
approach? Why isn't
> it
> the typical workflow in town (CSS seems to be the
dominant approach,
> despite
> obvious more steps and workforce than layout mode).
>
> Thank you in advance for your opinions, i appreciate.
> -
Asking about layout on apex page
Hai all, i'm newbie on web programming especially on apex,
is there tutorial or information about design region layout on page, because my region so crowd and not looks solid, especially about width region and centering contains on region
thank you5f97ccbf-340e-4ea9-b68d-3878e2d2dbc8 wrote:
Please update your forum profile with a real handle instead of "5f97ccbf-340e-4ea9-b68d-3878e2d2dbc8".
Hai all, i'm newbie on web programming especially on apex,
is there tutorial or information about design region layout on page, because my region so crowd and not looks solid, especially about width region and centering contains on region
In APEX page layout is controlled using a combination of HTML and CSS via themes and templates. You need to have an understanding of these web technologies to make best use of APEX. If you're not familiar with them you're advised to get at least a basic understanding by spending some time on the tutorials here: start with HTML, then HTML5 and CSS. To modify behaviour as well as structure and presentation, Javascript, the HTML DOM and jQuery are also required. -
I am trying to layout my gui.
I want to either incorporate another window by the side of my first window when the user selects a buttton.
Is it best to create the same window one size say "setSize(800,600)" Then once a user selects the button it sets the screen size to (1000, 600)".
Therefore having an extra column at the end with additional options.
Is this possible? please helpI am trying to create a media player in java which starts off about (700, 500) in size with only basic features visible i.e. The media player window and buttons such as; play, pause, progress bar, etc.
There are several advanced features options such as Links to streaming radio stations, playlists, etc. But all appear to the right of the screen (So the screen size will now increae to (900,500). With the relevant details in the extra right hand side of the screen.
When a user deselects the relevant advanced option the screen size returns to (700, 500).
I want to be able to have different options such as a stations list or a play list in the same part of the window (Therefore only one of the options can show at any given time).
Is this possible? If so how would i go about doing this? Any useful links?
Thanks -
Hi all,
I am creating a pdf form but i have getting a error message when i am saving the changes in layout with message id no. FPUIFB051(Changes to layout cannot be saved in display mode).
what will i do to save the changes.
Thanks in advance.
Sanket.good..
that means u r in display mode...
click on change icon...
then do changes and save it...
reward if it helps..
regards,
Omkar. -
Development problem about layout of default framework page
Hello experts,
I want to do some development for layout of default framework page.
The layout of default framework page named "framework page layout".
But I can't find the JSP file of "framework page layout".
I download and unzip the "com.sap.portal.layouts.default.par.bak" and "com.sap.portal.layouts.framework.par.bak", but both of them not contain the JSP file of "framework page layout".
Could you please tell me where to get the par or JSP file of "framework page layout"?
Best Rrgards,
Jianguo ChenHi Johan,
You are right !
Do you have modified the framework.jsp ? e.g: set the width to 800 .
<lyt:template>
<%
pageRunMode = epPageVariables.getRunMode();
if(pageRunMode == RunMode.RUN_TIME){
%>
<script>
document.body.style.margin=0;
document.body.scroll = "no";
</script>
<%}%>
<hbj:content id="myContext" >
<hbj:page title="Portal Page">
<hbj:gridLayout id="GridLayout1" width="800" cellSpacing="0">
<lyt:container id="frameworkColumn" />
</hbj:gridLayout>
</hbj:page>
</hbj:content>
</lyt:template>
Is this code right to change the with of frameworkpage to 800 pixels ?
Expect your responding
Best Regards,
Jianguo Chen -
About Layout control and Image alt text
Can i use normal HTML div tags to control layout ? is it bad practice or not? or i should go for template?
Can anyone please suggest how to add alt text and title to the images(logo) in ADF .Use af:image for displaying images.
You could specify alt text in shortDesc attribute property of af:image.
<af:form id="f1">
<af:image source="/images/SubbanaSolutions.png"
shortDesc="Subbana Solutions" id="i1"/>
</af:form>For more details regarding af:image, check this:
http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_image.html
Thanks,
Navaneeth -
Hello experts:
I want to know if it is possible to import a sap report layout, I do not know if the layout belongs to several tables, or the layout corresponds to an external file in the windows file system.
Appreciate your help.
Best regards.Hi Gordon:
I refer to layouts which I can use whithout using Crystal Report, I assume it must be PLD.
Thanks again. -
I have more than one layout in a form, would You handle?
hi,
for more than one layout u need to give like this in Driver program.
CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZZ_SCRIPTS48'
program = 'ZSCRIPTS48'.
call function 'end_form'.
It must conclude with end_form.
Regards,
Divya -
A few General Questions about Layouts
Hey.
I'm pretty new to Swing so I don't know much. My first question is do you have to use a Layout Manager to organize components on a JPanel? Is there no pixel way to do it? Secondly, for layouts, specifically for GridBagLayouts, is there any way to display the grid for developing purposes?
Thanks in advance.I'm sorry but the above code did not work. Even though I added the components, they still did not show. Anything I missed? Thanks.
My code is below:
import javax.swing.*;
public class SwingTest {
public static void main(String[] args) {
// Create application frame.
JFrame frame = new JFrame();
frame.setSize(500,500);
JPanel foo = new JPanel(null);
This 1 arugment constructor takes the layout manager as the argument.
You can alternatively do this:
JPanel foo = new JPanel();
foo.setLayout(null);
JLabel label1 = new JLabel("Label 1");
label1.setLocation(10, 10);
JLabel label2 = new JLabel("Label 2");
label2.setLocation(10, 50);
foo.add(label1);
foo.add(label2);
frame.add(foo);
// Show frame.
frame.setVisible(true);
} -
About layout for web dynpro project
i have a component named Acomp in my WD proejct.
i have two views named AView and BView ;
i have a windows,viewSet(1,2):(1,1) for Aview,(1,2) for Bview;
in AView:i have two buttons named displayBut and closedBut;
i do:
1.if i click the button of displayBut: display BView under AView;
if can do it by fire plug event.(for outbound plug of AView to inbound of BView).
2.if i click the button of closeBut:close BView ;(from outbound plug of BView to inbound of empty view);
i don't know how to invoke the plug event of BView in AView.hi,Mukesh mani
maybe u mistake what i wanna.
i don't know how to trigger this event in the action of AView as u said?
my close buttton is put into AView View.
<i> at the action Close of View B check
wdThis.wdFirePlug<toClose>();</i>
<b>your code is in BView view. how to invoke it in AView view?</b> -
How to fit the tabbed pane and table according to the screen size.
I tried to stretch to the page I was designing but looked like it fitted almost that I wanted in the design view but while viewing in the browser, there were blank spaces not covered by the components.
How to cover the whole area which were blank.
And how to place the components like forms, tables etc in the right place as we want or their display behavior.
When I dropped a form on the page(I set to a faceRef component) it aligned to the left . So how to place the components as we want ???To strectch a component to occupy the entire width - use styleClass="AFStretchWidth".
A marker style class that will declaratively stretch a component horizontally in a wide flowing container. This style class should be used instead of attempting to use a percentage width as an inlineStyle width to stretch a component horizontally. Features: Automatically applies stretching to just the components that can be stretched horizontally. Provides a work around for a bug in Internet Explorer 7. In this browser, a horizontally-stretched component can cause a horizontal scroll bar to appear. This scroll bar lets you scroll the distance equal to the width of the vertical scroll bar. This scroll bar should not appear at all. To work around this issue, this style class will use a smaller stretched width in order to reduce the chance of encountering this bug. If your component is already being stretched both horizontally and vertically by its parent component, then this style class will not be needed (it would be redundant).
To ensure that the component occupies the entire height,you should place the components insdie a container component that can stretch the child components - for example panelstretchlayout, panelsplitter.
The use-cases that you have mentioned are very generalized. If you could specify the exact use-case, we can help out.
Thanks,
Navaneeth -
So, I am using Netbeans to create a simple game, I am not familiar with coding layouts by hand which is where I am having a problem. The first level of the game has a grid of cards with dimensions 4 x 4. Level two has a grid of cards with dimensions 4 X 8. There is a container on the right side of the screen that holds information like how many moves the user has made etc. My question is what do I need to research in order to make the screen as compact as possible in each level. For example in level one with the 4x4 grid there is a lot of wasted room between the grid of cards and the container of info on the right. I would like to remove the wasted space, but in level two the space is needed to hold the 4x8 card grid so I would like it to expand to fit it.
A pointer in the right direction would be more than enough. I have been reading a lot about layouts etc. and cannot find anything to solve this. Maybe it is more complex than I thought it would be.
Thanks,
chrisSwing related questions should be posted in the Swing forum.
For example in level one with the 4x4 grid there is a lot of wasted room between the grid of cards and the container of info on the rightmake sure you pack() the frame.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting.
Well, you could always set the layout to null and set the bounds yourself. Sure and you could always rewrite all the JDK classes yourself, but that wouldn't be very efficient would it? Why reinvent the wheel which is what you are doing buy using a null layout.
Maybe you are looking for
-
We have two iTunes accounts we don't want to use our old account cause the password doesn't work how do we just use our new account? The problem is when we update apps it will ask for our password to our old account and when we go to down load an app
-
Is there a way to create a button to make an entire page visible or hidden in an Acrobat XI form?
-
Mail screen on iPad is locked on signup screen! How do I get out of this screen?
-
MailTo: at LinkToURL object doesn't work after upgrading to SP14
Hello, I am using LinkToURL and set it's value to an email address like this: mailTo:[email protected] This was working great until I've upgraded the portal from SP11 to SP14. Now when I write this I receive an exception "Invalid URL...". Any idea wh
-
Add video capture feature to CIVideoDemoGL
Hello, I'm a little bit stuck with the CIVideoDemoGL. How do I add video capture feature to this demo instead of using a file as input? I know how I capture the video stream from camera and captureOutput:didOutputVideoFrame:withSampleBuffer:fromConne