(No swing)want  two components in frame

I am trying to add two components to a frame. They should lay next to each other left to right. No matter what I do they seem to display on top of each other. I have tried BorderLayout and FlowLayout, creating the image twice as large as needed and adding the components directly to the frame. Nothing seems to work. Do you see anything wrong with this code?
Frame f = new Frame();
Panel panel = new Panel ();
panel.add(leftViewer); //Add the view to the left side
panel.add(rightViewer); //Add the view to the right
f.add(panel);
f.addNotify();
Image im = f.createImage(w*2,h*2);
Graphics g = im.getGraphics();
rightViewer.paint(g);
leftViewer.paint(g);
g.dispose();

You're right. What I am actually trying to do is create an image from the frame and write a Jpeg. I discovered that when I show the frame, the contents are correct, but after I write the image and look at it, the two components are overlapped (one overwrites a portion of the other). This is the code I'm using
Frame f = new Frame();
// Add the two components as before
Image im = f.createImage(w,h);
Graphics g = im.getGraphics();
rightViewer.paint(g);
leftViewer.paint(g);
g.dispose();
String base="view";
Jimi.putImage(im, base + ".jpg");

Similar Messages

  • How to use a context between two components at the runtime

    Hi Experts,
    My Web dynpro component is over the Generation limit (size of generated load is > 2 MB) so it always gets Warning when I active it. That why I have separated my application into two components and use the ViewContainerUIElement in order to show views of each other.
    In the application, I use also the TimeTrigger to refresh pages, all views have a TimeTrigger and the DELAY property of TimeTriggers is bounden into the same context attribute. I use a component to set up (change) the value of context attribute that is mapped with the Delay property. I want to change the Delay value on a component and other component will understand the changing.
    My problem is how I can use the same context attribute between components at the runtime?
    Let give me your advice on this.
    Many thanks,
    Ken

    Hi Ken,
    You can use [external context mapping|https://cw.sdn.sap.com/cw/docs/DOC-27901] to share data between two or more components using context.
    Thanks,
    Duy

  • Can Partial Trigger Work between Two Components Which Are in Two Pages?

    Scenario: Some output text components in page one while a SelectOneChoice and a InlineFrame are in page two. At first the resource attribute of inlineFrame was set to point to page one. When changing the value of SelectOneChoice, the values of those output text will be expected to change accordingly. I tried to make SelectOneChoice to be the trigger of those output text components, but found that SelectOneChoice can't be seen when attempt to edit the value of PartialTrigger attribute of those output text components. Then I tried to set the ID of SelectOneChoice as the value of the InlineFrame component, but failed getting the wanted result again.
    Problem: How to get a partial refreshing effect between two components that are in two different pages? Can partial trigger work in this scenario?
    Thanks for your interest!

    Hi,
    Sorry, you can't achieve that the way you're doing it. If you're using 11g, however, you could do that using regions.
    Regards,
    ~ Simon

  • Commmunication Between two Components

    Hi ,
    I am developing a project of having two components in it.  I want to communicate each component with other one. Both components should be communicating with each other.
    I am able to communicate from Component one to Component two . But !  unable to do the same from Component Two to Component one.  It shows the following error.
    Component ComponentOne: Cycle in component usage definitions: ComponentTwo
    Regards,
    Jyothi.

    Hallo Jyothi,
    Parent2Child-component-communication: apply interface method invocation (parent component with component usage relation to child component invokes interface controller method of child component --> IExternal-API)
    Child2Parent-component-communication: apply interface eventing (child component exposes interface controller event, child component defines NO cyclic component usage dependency to parent component, parent component subscribes own event handler to event of child component's interface controller, child component fires interface controller event at runtime and can also pass object references as event parameters).
    For data transfer across component borders apply interface-context-mapping
    1) exernal context mapping: data context in parent component, child component externally maps its interface context to it.
    2) interface context mapping: data context in child component, parent component maps own context to interface context of used child component.
    Regards, Bertram

  • Two components do PublishedStaticFiles over the same file, who wins?

    Hi,
    I use UCM 11G PS4.
    Does anyone knows how PublishedStaticFiles is working, I know it publish
    resources into the weblayout/resources/wcm/custom.
    But does anyone knows what happens if two components try to publish same file?
    I will expect that Content Server to merge the 2 published files into one
    depending by loadOrder.
    Can anyone tell me what is the difference between PublishedStaticFiles and PublishedWeblayoutFiles?
    Regards,
    Cipi

    The PublishedStaticFiles and PublishedWeblayoutFiles tables are essentially the same thing, in that they both define where to publish in the Weblayout folder/directory. However, PublishedStaticFiles is used to publish static items like images, while PublishedWeblayoutFiles is generally used to publish dynamic items like layouts. When you're in the config manager, the "Publish static layout files" and "Publish dynamic layout files" publish those tables, respectively. A brief overview can be read on Kyle's post.
    As far as merging published files, no, that is not possible. The Content Server publishes all component files, but if any have the same file name, the component with the bigger (higher) loadOrder will "win" and its file will override the other.
    For instance, in the .hda file of the component you want to be loaded, you'll have:
    @ResultSet MergeRules
    4
    fromTable
    toTable
    column
    loadOrder
    SSOPublishedStaticFiles <-- your table that defines where in the weblayout directory you want to publish your files to
    PublishedStaticFiles
    null
    500 <--loadOrder (set the value to something big like 500)

  • How to attach transmissi​on of two CAN cyclic frames?

    Hi all,
    I work with:
    Hardware: NI-PCI 8512, CAN interface.
    Software Environment: C++
    OS: Windows7
    I try to transmit two separate cyclic frames, with gap of up to 125 usec between one other.
    I try the approach of sending the nxStart command line after line - and i got a gap of 600 usec. Not good enough...
    Any ideas?
    Thanks for advance,
    Aviad

    Just to clarify..
    You want to send Cyclic Frame (ID = 1) every 100ms
    "Immediately" after sending the ID = 1 frame, you want to send ID=2 frame
    In theory, I think you could do this. NI-XNET should send the frames in priority order if there is a "collision", meaning that the two frames are attempted to transmit at the same time.
    You could try:
    Create Cyclic Frame ID = 0x1, set Cyclic rate to 100ms
    Create Cyclic Frame ID = 0x2, set Cyclic rate to 100ms
    Create Signal for Cyclic Frame 2
    Create session to Id = 0x1 (FrameOutSinglePoint)
    Set nxPropSessionSub_CANStartTimeOff for the session to some number (>= 1)
    Create session to Id = 0x2 (SignalOutSinglePoint)
    Set nxPropSessionSub_CANStartTimeOff for the session to the same number
    Start session 1 (use session only)
    Start session 2 (normal)
    I think this should work to accomplish what you want.. however...
    You cannot really have any guarantees on the CAN bus due to collisions (if your IDs are exactly 1 and 2 you are pretty safe since those are two of the highest priority frames, but in the normal world those are not typically the two frames that are generated). I think it would be better to do everything the same as above, but set the Set nxPropSessionSub_CANStartTimeOff for the second session to be N+1 (N is the number for the first session). The second frame should transmit 500us after the first one in this case. The advantage of this is that you are not relying on any detected collision in the driver (there is an ever so slight chance that they could be sent in the opposite order). You would see 500us instead of 125us (although you wouldn't actually see 125us in the first situation as the two frames would be sent back-to-back every 100ms).
    Is the 125us required? Do you know the data to transmit ahead of time? You could use stream output in replay mode to get precise timing, but that somewhat requries you to know exactly what you want to send ahead of time.

  • Two components per cell on a web dynpro table

    Hi all,
    I've been working with SAP Netweaver JAVA Stack. Now i'm trying to display two components on a cell of a table, but i can't...
    I've been looking to CellVariants, but that only allows me to display another type of component (always one) on a certain condition.
    What i want is to display on the same cell a Textview and a InputLink for all the rows.
    I've tried to add a Panel to the TableCellEditor, hoping i can next add a textview and a inputlink to the panel, but that isn't allowed.
    How can i add the components at the same time on the same cell?
    Can anybody help me?

    Please don't give up, there's hope
    Context
    + Items (node, c=0:n, s=0:n)
      + CategoryData (node, c=0:1, s= 0:1, singleton=false)
         + categoryName (string)
      + ProjectData (node, c=0:1, s=0:1, singleton=false)
         + projectName (string)
      + StandByData (node, c=0:1, s=0:1, singleton=false)
         + standByName (string)
      + TaskData (node, c=0:1, s=0:1, singleton=false)
         + taskName (string)
      + Children (recursion -> Items)
      + childrenLoaded (boolean)
      + expanded (boolean)
      + isLeaf (boolean)
      + type(string)
    The type can have the values "ProjectCategory", "TaskCategory", "StandByCategory", "Project", "Task", "StandBy". This context structure gives you the tree hierarchy and for each type of node you can store different type-specific data. The "CategoryData" represents the data for the top level which shows the categories "Products", .... The meaning of the other subnodes should be clear.
    The UI element hierarchy looks like this:
    Table (dataSource = Items)
      + TreeByNestingTableColumn
        (childrenLoaded = Items/@childrenLoaded, expanded = Items/@expanded, isLeaf = Items/@isLeaf)
        + Caption (text = Items/CategoryData/@categoryName)
      + NameColumn (selectedCellVariant = Items/@type)
         + TextView (standard cell editor, not used)
      + ProjectNameEditor (CellVariant, variantKey = "Project")
         + TextView (text = Items/ProjectData/@projectName)
      + TaskNameEditor (CellVariant, variantKey = "Task")
         + InputField (value= Items/TaskData/@taskName)
      + StandByNameEditor (CellVariant, variantKey = "StandBy")
         + InputField (value= Items/StandByData/@standByName, readOnly=true)
    To be continued...

  • In the report level user wants two persons against each work center.

    Hi Experts,
    Please let me know the solution, I have provided scenario below.
    check the query which the user is referring to report:
    Example
    Work center     Person
    KNE33102     44003850
    According to the user, the names for the Work centers should be as follows:
    Work center          Person
    KNE33102         44003850,
    KNE33102        44003603
    I have check the data in T-code-CR03, each work center getting two persons, as can be shown below.
    Work center        Person
    KNE33102           44003850,
    KNE33102           44003603
    In RSA3 it can be seen that both the records are being extracted
    Work center     Start date     End date     Person
    KNE33102     09.02.2009     31.12.2009     44003850
    KNE33102     09.02.2009     31.12.2009     44003603
    In BI , when checking in PSA, it can be seen that the data is also being loaded to BI (Two persons loaded against Work center-KNE33102)
    Work center     Start date     End date     Person
    KNE33102     09.02.2009     31.12.2009     44003850
    KNE33102     09.02.2009     31.12.2009     44003603
    But when loading to the Info Object, one person has deleted. Because of this, in the report level displaying one person.
    Note:-Please let me know what is the procedure, in the report level user wants two persons against each work center.

    Hi,
    As you said in your post the data has mentioned up to 2009. can you try execute the query till to date .
    Regards
    sivaraju

  • How can I link data in two components in a BI Publisher report?

    Hi,
    If possible, I would like to make a BI Publisher (11g) report build as a pivot table next to an ordinary table, where data in each row in the two tables are linked to each other. E.g. if Customer A is shown in first row in the ordinary table, it should also be in the first row of the pivot table etc.
    Any filtering and sorting defined in the ordinary table to have effect in the pivot table.
    I would like to have a Top-10 filter on my data set, but that is not possible in a pivot table. That's why I somehow need to link the two components to each other.
    I have tried to do this by linking data sets in the Data Model, but that doesn't seem to work.
    Does anyone know if this is possible at all?
    Thanks,
    Henning

    Hi BIPuser,
    Thanks for a quick response.
    A useful link, but not really what I was looking for.
    I would like a pivot table to be related to whatever is shown in an ordinary data table. I have not been able to do that and maybe it isn't possible. In the link you sent me, you also see that any filtering made in the lower table doesn't affect the upper graphs (at the end of the video).
    Another way to solve my problem would be to replicate the filtering in the pivot table based on the filtering in the ordinary table. But for some reason Top/Bottom filtering is disabled in pivot tables. Do you is there is another way to use a top-10 filter in a pivot table?
    Thanks,
    Henning

  • My user folder has disappeared from my hard drive though if I do a find for it it says it is still there. Anyone know how to restore it. I can drag a duplicate from the find window onto the hard drive but don't want two copies with one hidden.

    My user folder has suddenly disappeared from my hard drive though if I do a find for it it comes up as still being there with all its data. Can drag a duplicate copy from the find window back onto the hard drive but don't want two copies there with one of them hidden. Any suggestions anyone?

    Did you update to 10.9.3?
    If you did then update to iTunes 11.2.1.
    That is the fix for that problem.
    Allan

  • How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    I don't think Finder does this (I've tried).
    iTunes does though. Where you can set artwork or the "poster frame"...
    This may not be what you want but if it helps, I know 2 ways  do this is
    Open the video in QuicktimePlayer7 | View | Set Poster Frame (even then, you might need to save it as .mov (ie in a 'mov container').
    Drag the file into iTunes and set the artwork (as in http://www.dummies.com/how-to/content/adding-album-cover-art-or-images-in-itunes .html)
    From there, iTunes will use that frame as the "poster frame" ie the photo/frame that shows when you browse your videos. Which is what you want, but limited to iTunes.
    When I do either of these above, the frame I set does not show when exploring files in "Finder" (or in the other Explorer tool I use called "Pathfinder").
    So it maybe, that exactly what you want, is not possible.

  • Two separate text frames with own toc

    How do I set up two separate text frames side-by-side as two columns, and create a separate table of contents for each?
    I need to create a two-language document with English on the left and a translated language on the right. Each language will also have separate illustrations and cross references to them in the text. Basically, I need to create two manuals in a single document.
    I'm doing this with Frame 7.1 if that makes any difference.
    Thanks in advance for any suggestions.

    To create the two separate text frames, simply use the Text Frame graphic tool on the Master Pages to draw tthe second frame. You will need to give the "Flow"  for this text frame a unique name. By default FM uses "A" for a flow name, but you can change this to be the name of the language.
    See: http://help.adobe.com/en_US/framemaker/using/WSd817046a44e105e21e63e3d11ab7f74e4d-7fb8.htm l (Set up a multi-flow document)
    However, I would recommend that you first create separate documents for the English and translated versions. Then import the contents of those documents by reference (i.e. create text insets) in your combined document.
    Use the combined document as your publishing vessel and the separate documents as your editing/working environment.
    The only gotcha would be if you need to maintain side-by-side fidelity with each paragraph in the English and translated version. If so, then you should import by copy and then you'll hjave to manually adjust the paragraph spacings to stay lined up.

  • Horizontal paragraph rule across two-column text frame?

    Hi,
    as the title suggests, how do i get a horizontal rule to run across a two-column text frame?
    I have either had the rule just apply to the entered text; had a gap where the column gutter is;
    or I have had to set the column gutter to 0mm/px and manually set carriage returns to give the impression of a gutter.
    Surely there is a better way?
    I'll attach a jpeg of my various options.
    Hope I've been clear-enough. All help is appreciated.
    Cheers, Matt

    You can put the rule in a paragraph which is spanning a columns.
    Or you can extend the paragraph rules by inputing minus values to left and right (e.g. -5mm)
    Or you can use a table instead.
    Or you can use negative left and right intend for the text but extend the rule to the end of the frame.
    Never set a carriage return manually.

  • Event Listening across two components?

    Let's say I have two components. One of them has a button.
    The other will post an Alert once it detects that the button has
    been pressed.
    How can the Alert component detect the button press of the
    other component? I figured an eventListener would been needed, but
    I am not sure how to write it.

    Something like that might work, but from a programming
    standpoint, your components should be designed in such a way that
    they know absolutely nothing about the outside world (parent or
    other components). For all it knows, it's the only component in
    existence. But, using events, he could send out a message (event),
    that if someone else (another component) happened to hear it, they
    could do something in response to it. Think of the movie "Contact"
    (if you've ever seen it).
    Anyway, your best bet is to make a custom event that is able
    to encapsulate an ArrayCollection. Then when the button is clicked,
    you wrap up the AC in the event and send it out. Your other
    component will be listening for events that are of that type (your
    custom event). Then he can unwrap the AC in it and use it. If you
    do not know how to create custom events and/or send data in events,
    look up a tutorial on it. It's not that difficult to implement if
    you can follow the concept I just talked about. However, I've also
    personally tried to make a custom event to pass an ArrayCollection,
    and for some reason it never worked (even though I followed some
    tutorials down to the letter).

  • How to put some space b/w two components in panelGrid

    Hi,
    Can any one tell me how to put some space between two components in a panelgrid.I am trying to put   between the components in panelGrid,but it is not allowing me.
    I tried by putting <div> tags also...I am getting space on the top of the panelGrid...
    please tell me.
    Thanks

    Apply CSS. Make use of the margin/padding properties.
    If you never heard of CSS, start here: http://www.google.com/search?q=css+tutorial
    It's one of the essential knowledges (near HTML/JS/DOM) for webdevelopment.

Maybe you are looking for

  • More Questions on Rules in General

    Okay so here is my situation.  I have a user that is wanting to use either Public folders or a shared mailbox to automate a series of manual processes.  For example: A customer service rep(CSR) takes a call asking for x to be completed. CSR than send

  • Daisy chain isp to MP then out ethernet 2 to wireless hub possible?

    hello I have a 2 x 2.66 GHz macPro and am running 10.5.7 I have 2 ethernet ports in the back of my unit. and I would like to run the internet into port one. then daisy chain port to to my wireless hub. (a D-link dl-524) I know this is a little unorth

  • Excise Scenarios in India

    Hi ... is there any link for the Central Excise Process and in simple language and in short . With various recoprds we need to maintain and formats required . Pls do not give the link of Govt of Indias Central Excise website. I have already checked t

  • HT4623 how to update my iPhone 4

    How do you update the iPhone 4 with iOS 4.3 using iTunes?

  • Choosing Album Art from the Internet

    Whenever I try to use images from online to use as album art or as wallpapers on my Mac, they come out blurry/pixelated. Is there a special format that I should be using to make my pictures look sharp? I have the MacBook Pro 13". If anybody could hel