Display an HTML page within a a panel
I want to create an applet with multiple panels, and have the ability to display HTML pages within these panels. These will be HTML pages with formatting complex enough that the JEditor display won't be able to handle them. I experimented with showDocument() but that seems to only work in the main applet frame, and attempts to put a frame inside a panel did not work. I came across some postings that talked about JSObject, but got the impression that does not always work and is very browser dependant.
Any suggestions?
Yes JLabel supports HTML, e.g.
public static void showHelp()
JFrame frame = new JFrame();
JLabel helpLabel = new JLabel();
JLabel.setText("<HTML>This is a <b>help</b> file.</HTML>");
frame.getContentPane().add(helpLabel);
frame.setBounds(0,0,200,200);
frame.setVisible(true);
}
Similar Messages
-
Any "free" classes out there to display an HTML page within Applet?
I'm not using Swing - so I'd prefer a basic HTML parser and renderer. I just want to make a simple help system for my applet -
Any ideas?Yes JLabel supports HTML, e.g.
public static void showHelp()
JFrame frame = new JFrame();
JLabel helpLabel = new JLabel();
JLabel.setText("<HTML>This is a <b>help</b> file.</HTML>");
frame.getContentPane().add(helpLabel);
frame.setBounds(0,0,200,200);
frame.setVisible(true);
} -
Displaying HTML page within Flash
Hello!
We need to display an HTML page within a Flash executable file. We request the members of this forum to kindly guide us on how to go about it.
Looking forward to your reply.
Thanks and Regards,
Hayagriva Softwareflash textfield's have limited html tags they can parse so your best bet is opening an html page in another window using getURL() (as2) or navigateToURL() (as3).
-
Display external html page in (Collapsible Panel widget)
i everybody
is there a way to display external html page in (Collapsible Panel widget)
All the example a seen is with raw text in it
is the panel can display different object instead of simple text
At least a internal designed html page
ThanksThanks... surely a easy one for you
But its a great tool and its exatly what i want
even my js button works trough it
Thanks again -
How can I display the HTML page from servlet which is called by an applet
How can I display the HTML page from servlet which is called by an
applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
I am calling my struts action class from the applet. I want to show the response in the same browser.
Code samples will be appreciated.hi
I got one way for this .
call a javascript in showDocument() to submit the form -
How to display static HTML pages in Oracle Forms 6i
I want to display static HTML page in oracle Forms ? Can any body help please ? Its very urgent. Many thanks in advance.
Suresh,
there exist a Java Bean in teh Forms 6i demos that shows a static HTMl example. Note that the HTML that could be shown is somewhat basic, but it will give you an impression how it can work. The demos are at otn.oracle.com/products/forms --> samples --> 6i demos
Frank -
How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget
Hi,
I have a requirement as below:
1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages which are hosted in my sharepoint site.
Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
Thanks.
Knowledge is power.Hi Manoj,
As I understand, you would like to display SharePoint page in another platform.
Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
page could be displayed on other platform.
Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
HTML page within a Flash Movie?
I have an HTML page on my server that I'd like to be able to
have inside my Flash movie, is there any way this could work? I
don't want to use the external Text file method. I've been trying
to use an iframe over a Flash movie to fake it but I just get all
kinds of browser problems when I try to do that. I'd just like
Flash to be able to display an HTML page like an iframe does. Is
that possible?
Thanks in advance!nope. this exact question gets asked here from time to time
and the answer is really just that
simple - no - but flash does support some HTML tags for text
but HTML as a language is completely
different animal from flash player.
Chris Georgenes
Animator
http://www.mudbubble.com
http://www.keyframer.com
Adobe Community Expert
*\^^/*
(OO)
<---->
gadillion wrote:
> I have an HTML page on my server that I'd like to be
able to have inside my
> Flash movie, is there any way this could work? I don't
want to use the
> external Text file method. I've been trying to use an
iframe over a Flash
> movie to fake it but I just get all kinds of browser
problems when I try to do
> that. I'd just like Flash to be able to display an HTML
page like an iframe
> does. Is that possible?
>
> Thanks in advance!
> -
Displaying an html page from a byte array
I'm trying to display an html page that i receive from a byte[ ] but the navigator asks me to download it instead of displaying it.
exactly a better option here would be display that HTML content using a dedicated servlet/jsp.
checkout below example code snippet hope that might help
public void doPost(request,response)throws ServletException,IOException{
//fetch HTML bytes.
Byte buffer[] = Delegate.getBufferData();
ByteArrayInputStream in = new ByteArrayInputStream(buffer);
int contentSize = in.available();
response.setContentType("text/html");
response.setContentLength(contentSize);
BufferedOutputStream out = null;
try{
out = new BufferedOutputStream(response.getOutputStream());
while( contentSize-- > 0 )
out.write(in.read());
out.flush();
}catch(Exception exp){
exp.printStackTrace();
throw new Exception(exp.getMessage());
}finally{
try{
if(out != null)
out.close();
if(in != null)
in.close();
}catch(Exception ep){
ep.printStackTrace();
throw new Exception(ep.getMessage());
}finally{
out = null;
in = null;
}and respectively call the servlet.
Hope this might help :)
REGARDS,
RaHuL -
Display external html page in a view
Hi,
following Problem,
I have a Viewcontainer with 2 columns ans one row. In the left cell I display a tree. OnSelect Event I'd like to display a html page in the right cell.
Example:
Searchengine
-> Google
-> Yahoo
-> ...
On Klick at google in the treeview I'd like to show http://www.google.de in tghe right cell - this means the tree should still display.
Is this possible - and has anyone an idea to do this?
thanks in advance
GregorHi
We strongly donot recommend usage of Iframe, because its support is depcrecated and will not be available for future versions.
For a short duration or for current version, use can Iframe only for static html links. Try using link to URl and display the htmls in external windows.
Check out this link
http://help.sap.com/saphelp_erp2005/helpdata/en/e9/7652a84fada444bd11ca73670ce7dc/frameset.htm
My advice is to change your functionality accordingly
If you have any specific requirements do let us know
Thanks
sathyanarayanan -
To display an html page that contains frames, using servelt
Hi all
i am using a servlet which has to display a html page that contains frames.
I would like to know whether it is possible to display a frame using servlets.
If yes please tell me the how to do it?
Thanks,
Sudheer.Thanks Seth.
I just tried that, but when I run it in preview mode (by simply hitting F12), it gives me an error because it can't find the file in the temporary preview folder it creates (ie:
C:\Users\Tom\AppData\Local\Temp\CP2840464090993Session\CPTrustFolder2840464091009\Captivat ePreviewLoader\
I'm hoping to find a place to put it so that it works when running F12 and when running in regular 'published' mode
I was thinking I could put it in the 'C:\Program Files\Adobe\Adobe Captivate 6 (32 Bit)\Templates\Publish' folder, but when I do that, it doesn't seem to gete copied to the .\CaptivatePreviewLoader folder when running F12 -
How to extract image from oracle database and display at html page
Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.
Thanks for ur reply Mr.Rajasekhar
I tried as u said,
i tried without converting to sql date ,but still i din't get any results
java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
java.util.Date fromDate=dateFormat.parse(startDate);
java.util.Date tillDate=dateFormat.parse(endDate);
String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"' and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
System.out.println(query1);
//From main method
databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
---------- java ----------
select MTName,Date,MTLineCount from linecountdetails where mtname='prasu' and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
java.lang.NullPointerException
null
null
java.lang.NullPointerException
Output completed (4 sec consumed) - Normal TerminationThanks
Prasanna.B -
Tabbed Panel using UpdateContent doesn't properly display spry .html page
Quick question. I have a tabbed panel widget with 12 tabs.
I'm using the UpdateContent snippet to pull in .html pages per tab.
when I have straight .html on the pages the content displays
without a problem.
What I need is for each tab to pull in an .html page that
contains a spry table that has an XML data set (think product page
with "next" and "prev" buttons to cycle through the content).
The .html page with the spry table works like a charm...on
it's own. however when I use it in conjunction with the tabbed
panel all I see is the bracketed code (i.e. {imgURL} {productName}
{SKU}) rather than [photo] large T-shirt SKU:1111.
A while ago I did an accordion that had dynamic content per
generated panel -- this utilized the Spry.Data.NestedXMLDataSet
function. A bit of a similar idea although I'm not sure if this
would also work with the tabbed panel.
Any suggestions would be helpful and I can drop the code if
that would also help. Thanks!well, what I have is:
index page with tabbed panel
|
V
click tab
|
V
content from first option .html page loads. this content has
a dataset repeating table.
The main page already had the SpryData.js and also
UpdateContent, as follows:
<div id="TabbedPanels1" class="VTabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('one','siracusa.html');">Siracusa
Micro Crepe</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('two','peony_georgette.html');">Peony
Printed Silk Georgette</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('three','wool_pucker.html');">Wool
Pucker</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('four','textured_dot.html');">Textured
Dot</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('five','textured_cotton.html');">Textured
Cotton</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('six','crane.html');">Crane
Printed Four Ply Silk</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('seven','tencel_jersey.html');">Tencel
Jersey</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eight','circular_wool.html');">Circular
Stitch Wool</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('nine','silk_burnout.html');">Silk
Burnout</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('ten','organza.html');">Floral
Silk Organza</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eleven','micro_crepe.html');">Micro
Crepe</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"
id="one">Siracusa</div>
<div class="TabbedPanelsContent" id="two">Peony
Printed</div>
<div class="TabbedPanelsContent" id="three">Wool
Pucker</div>
<div class="TabbedPanelsContent" id="four">Textured
Dot</div>
<div class="TabbedPanelsContent" id="five">Textured
Cotton</div>
<div class="TabbedPanelsContent" id="six">Crane
Printed Four Ply Silk</div>
<div class="TabbedPanelsContent" id="seven">Tencel
Jersey</div>
<div class="TabbedPanelsContent" id="eight">Circular
Stitch Wool</div>
<div class="TabbedPanelsContent" id="nine">Silk
Burnout</div>
<div class="TabbedPanelsContent" id="ten">Floral Silk
Organza</div>
<div class="TabbedPanelsContent" id="eleven">Micro
Crepe</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
Let's say you clicked on the Siracusa tab. This would call up
siracusa.html, which has
<script src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<link href="../../ed_style.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var fall08 = new Spry.Data.XMLDataSet("fall_collection.xml",
"collection/outfits", { filterFunc: MyPagingFunc });
fall08.setColumnType("photoURL", "image");
fall08.setColumnType("lrgphoto", "image");
var pageOffset = 0;
var pageSize = 1;
var pageStop = pageOffset + pageSize;
//var dsfall08 = new
Spry.Data.XMLDataSet("fall_collection.xml", "collection/outfits", {
filterFunc: MyPagingFunc });
function MyPagingFunc(ds, row, rowNumber)
if (rowNumber < pageOffset || rowNumber >= pageStop)
return null;
return row;
function UpdatePage(offset)
var numRows = fall08.getUnfilteredData().length;
if (offset > (numRows - pageSize))
offset = numRows - pageSize;
if (offset < 0)
offset = 0;
pageOffset = offset;
pageStop = offset + pageSize;
// Re-apply our non-destructive filter on dsStates1:
fall08.filter(MyPagingFunc);
-->
</script>
Sircusa Micro Crepe
<div spry:region="fall08">
<table>
<tr spry:repeatchildren="fall08">
<td colspan="5 "><img
src="imx/{photoURL}"/></td>
</tr>
<tr spry:repeatchildren="fall08">
<td><a href="imx/{lrgphoto}"
target="_blank">enlarge</a></td>
<td>{SKU1}</td>
<td>{SKU2}</td>
<td>{SKU3}</td>
<td>{name}</td>
<td>{desc}</td>
</tr>
</table>
<input type="button" value="Prev"
onclick="UpdatePage(pageOffset - pageSize);" />
<input type="button" value="Next"
onclick="UpdatePage(pageOffset + pageSize);" />
</div>
siracusa.html works more than fine. pulls in the photo, link,
SKU and info without any problem.
When you're on the base page with the tabbed panel the only
thing that comes up are the bracketed info, i.e. {SKU} {SKU1}
{SKU2}.
What I need help with is actually having the pulled in data
table (in the various tabbed panel content areas) actually then
populate the repeat regions rather than just showing the
code... -
Displaying multiple dynamic html pages within a single Portal folder.
Hi all,
Question: How can I display multiple dynamic html pages that are linked to each other, within a single portal folder?
History:
I have a designer/web server application (PL/SQL packakges) on Oracle
8.1.7. Early in the development process we built it into WebDB2.2 and
used folders on the left side as a navigation bar and the contents of my packages on the right side. This was easy, WebDB used Frames.
Unfortunatley I could never automatically display a PL/SQL item in the folder area.
Now I need to integrate the application into Portal 3.0 not the early adopters version, the one with 9iAS (NT for now, Unix later). I have a page/content area divided into regions and a navigation portlet on the left side containing links to PL/SQL folders whose contents are displayed on the right side. On the right side I have (for example) a Queryview. When I click on any of the buttons (i.e. Find, New), I land in a new page outside of my portal folder. This page contains a dynamically built list (from one or more DB Tables) and of course the first column contains a list of links that bring you to the individual item. How do I set my links or configure my folder to display
within the portal folder area?Hi,
One alternate is, increase the size of your screen, for this go to the layout of your screen and increase it as much you want, and also the custom container size, so that no scroll bar will appear at least.
Other solution would be, as you said ALVs will be dynamical, it will be good to create buttons, or links on the screen based on the no of ALVs dynamically and on click of corresponding button call the corresponding ALV.
But i dont think this will serve, first check the first option.
Hope this helps u.,
Thanks & Regards,
Kiran. -
Displaying clickable html page in a JFrame
Hello again programmers,
i'm wondering how can i display a clickable html page in a JFrame using any Panel (JEditorPane,.....) can you show me the way plz?
BernardMakes a pretty crappy browser, but its OK for help-type functions.
HtmlViewFrame.java
import java.net.URL;
import java.io.File;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
*Primitive HTML browser window based on a HtmlViewPane.
public class HtmlViewFrame extends JFrame
private HtmlViewPane pane;
private JFrame frame;
*Creates a frame based on a file.
public HtmlViewFrame(File file) throws Exception
this(file.toURL());
*Creates a frame based on a URL.
public HtmlViewFrame(URL url) throws Exception
frame = this;
getContentPane().setLayout(new BorderLayout());
JPanel but_panel = new JPanel();
but_panel.setLayout(new FlowLayout(FlowLayout.LEFT));
JButton but_home = new JButton("home");
but_home.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
try
pane.home();
catch(Exception e)
JOptionPane.showMessageDialog(frame, "Error: " + e);
but_panel.add(but_home);
JButton but_back = new JButton("back");
but_back.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
try
pane.back();
catch(Exception e)
JOptionPane.showMessageDialog(frame, "Error: " + e);
but_panel.add(but_back);
getContentPane().add(but_panel, BorderLayout.NORTH);
pane = new HtmlViewPane(url);
JScrollPane jsp = new JScrollPane(pane);
getContentPane().add(jsp, BorderLayout.CENTER);
getContentPane().add(pane.getActionField(), BorderLayout.SOUTH);
*HTML viewer application.
*Uses java.lang.System.exit(int), so method should not be called from within a Java application.
*@param args String array; provide a URL or file path as args[0]
public static void main(String[] args)
if(args.length==0)
System.out.println("must provide File path or URL as argument");
System.exit(1);
Exception err = null;
try
File file = null;
try
file = new File(args[0]);
if(!file.exists()) file = null;
catch(Exception ex)
file = null;
err = ex;
URL url = null;
try
url = new URL(args[0]);
catch(Exception ex)
url = null;
err = ex;
HtmlViewFrame frame = null;
if(file!=null) frame = new HtmlViewFrame(file);
else if(url!=null) frame = new HtmlViewFrame(url);
else throw err;
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(600,400);
frame.show();
catch(Exception e)
err = e;
if(err!=null) System.out.println("ERROR: " + err);
HtmlViewPane.java
import java.net.*;
import java.io.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.html.*;
*A HTML panel based on JEditorPane.
*Suitable for rendering primitive HTML files such as help documentation.
public class HtmlViewPane extends JEditorPane
/**The maximum number of elements the object can hold in its history.*/
public static int MAX_HISTORY_SIZE = 100;
private Vector history = new Vector();
private URL home;
private JTextField lab_lastact = new JTextField("loaded document");
*Creates a panel based on a file.
public HtmlViewPane(File file) throws Exception
this(file.toURL());
*Creates a panel based on a URL.
public HtmlViewPane(URL url) throws Exception
home = url;
setEditable(false);
addHyperlinkListener(new HtmlViewPaneListener(this));
setPage(url);
lab_lastact.setEditable(false);
void addToHistory(HyperlinkEvent e)
lab_lastact.setText("ACTION: go here: " + e.getURL().toExternalForm());
if(history.size()>=MAX_HISTORY_SIZE) history.removeElementAt(0);
history.add(e);
*Causes the pane to move back to the last item in the history.
public void back() throws Exception
if(history.size()==0)
lab_lastact.setText("ACTION: exhausted history list (max size=" + MAX_HISTORY_SIZE + ")");
return;
HyperlinkEvent e = (HyperlinkEvent) history.lastElement();
history.removeElement(e);
processEvent(e, false);
lab_lastact.setText("ACTION: back to here: " + e.getURL().toExternalForm());
*Returns a JTextField that reports hyperlink, back and home actions to the user.
public JTextField getActionField()
return lab_lastact;
*Causes the browser pane to return to the initial page.
public void home() throws Exception
setPage(home);
lab_lastact.setText("ACTION: home to here: " + home.toExternalForm());
void processEvent(HyperlinkEvent e, boolean addtohistory)
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
if (e instanceof HTMLFrameHyperlinkEvent)
HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;
HTMLDocument doc = (HTMLDocument) getDocument();
doc.processHTMLFrameHyperlinkEvent(evt);
else
try
setPage(e.getURL());
if(addtohistory) addToHistory(e);
catch (Throwable t)
t.printStackTrace();
class HtmlViewPaneListener implements HyperlinkListener
private HtmlViewPane pane;
HtmlViewPaneListener(HtmlViewPane pane)
this.pane = pane;
public void hyperlinkUpdate(HyperlinkEvent e)
pane.processEvent(e, true);
}
Maybe you are looking for
-
Hello friends, Can any one answer these questions SAP Solution Manager Overview Key points - Scope of Solution Managers capabilities - Work required to implement and configure Solution Manager i.e. how much is out of box vs. customer/im
-
How to email a concurrent program output in PDF format?
I have a XML report running as a concurrent program with PDF output. I need to automate the xml report to be emailed to a specific user as the concurrent manager runs with PDF output. I am using reports 6i and database 10g. Please help me.
-
Tables for Project System Component
Hi, I hve the list of standard DS from Project System component. Currently these DS are not active in our ECC system. Now I need to find the Source table for all these DS. Can any one please provide the table name if you have. I searched in sdn/help.
-
Adobe pixel bender toolkit 2.5
Im trying to update my CS5 and the application manger say i need adobe pixel bender toolkit 2.5 for Adobe Flas Pro The application mange can't/won't update it so I'm trying to do i manually but can't find it annywear Anny ideers on where to get it
-
Confused with picture count. Can somebody explain?
I am thinking about getting the new 5s and wanted to see how much storage I will need. When I view "Camera Roll" the picture count is 304. When I view the photo count through Settings..General..About... the photo count is 617. Why are these numbers s