Display DB SQL in APPLET (Urgent)
Hi,
I want de learn about How to display a Table in MS-SQL 7.0 in Applet.
Can you please give me web resources, where I can found informations.
Thanks in advance.
Sam
something like this for Access?
http://www.geocities.com/rmlchan/dba.html
Similar Messages
-
Check boxes are not being displayed in any list applets
Issue: The check boxes are not being displayed in any list applets in the system. A check box can be marked in the system, but as soon as the user clicks anywhere outside of the box the check box 'visibly' disappears. If you hover the mouse over the check box it displays a 'Y'. However, check boxes are working fine for the form applet, the issue is only with the list applet.
I verified the checkboxes work fine in the thick client and in production. However, it is the testing environment, which belongs to client, that is showing the above behavior. I think there is some setting that is missing for them. But I am unable to figure it. I would really appreciate if someone could help !!
Thanks in advanceOne way that you could make it work (just tried it out again) is to use the windings font
and use the checkboxes from there. However, you need to register the font with xml publisher. In the template builder for Word, you can put a configuration file under:
C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\config
(depnding on your installation). The file should have the name xdo.cfg or xdoconfig.xml.
There is an example file: xdo example.cfg that you rename and change accoringly.
The font is there setup for windows 2000 as an example. Select the correct font
path - for my XP it is:
<font family="Wingdings" style="normal" weight="normal">
<truetype path="C:\WINDOWS\fonts\wingding.ttf" />
</font>
Then you can put the symbols into your RTF template and it will be rendered.
At least it worked for me - with 5.6.2. (Availbable on Wednesday or Thursday), but
I am pretty sure I tried it before with 5.5.
Didn't have the 5.5 manual with me - so I have to check what that says again..
Hope it helps,
Klaus -
Dont want to display "Report Successfully Run" applet
Dear Users....I Dont want to display "Report Successfully Run" applet after my report runs successfully. I'm calling report from Forms-10g Rel.2 and my browser is Internet Explorer ver.6. I'm sending my report directly to printer using Web.Show_Document.If my report is sent to printer successfully there is no need to display browser window with the above mentioned message. Is there any solution for this???
Code in when-button-pressed
DECLARE
V_Usr_Prm Varchar2 (1000);
BEGIN
V_Usr_Prm :=
'FROM_REF_NO='
|| P_FRM_REF_NO
|| '+TO_REF_NO='
|| P_FRM_REF_NO
|| '+P_PRE_BY='
|| P_PRE_BYE
|| '+P_VR_TYPE='
|| P_VOR_TYP
|| '+YEAR1='
|| P_VOR_YER
|| '+MNU_IDE=0'
|| '+P_PRN_FLG=1';
web_show_document_proc ('HTMLCSS', 'Y:\02\\02\VOR_PRN.REP', V_USR_PRM);
END;
Procedure Web_Show_Document_Proc is
PROCEDURE WEB_SHOW_DOCUMENT_PROC (runformat varchar2,
reportname varchar2,
userparameters vARCHAR2)
IS
i NUMBER (10);
v_a VARCHAR2 (10);
v_b VARCHAR2 (10);
vc_url VARCHAR2 (1000);
vc_url_temp VARCHAR2 (1000);
vc_user_name VARCHAR2 (30) := GET_APPLICATION_PROPERTY (username);
vc_user_pw VARCHAR2 (30) := GET_APPLICATION_PROPERTY (password);
vc_user_connect VARCHAR2 (30)
:= GET_APPLICATION_PROPERTY (connect_string) ;
BEGIN
vc_url :=
'userid='
|| vc_user_name
|| '/'
|| vc_user_pw
|| '@'
|| vc_user_connect;
FOR i IN 1 .. LENGTH (vc_url)
LOOP
v_a := LTRIM (TO_CHAR (TRUNC (ASCII (SUBSTR (vc_url, i, 1)) / 16)));
IF v_a = '10'
THEN
v_a := 'A';
ELSIF v_a = '11'
THEN
v_a := 'B';
ELSIF v_a = '12'
THEN
v_a := 'C';
ELSIF v_a = '13'
THEN
v_a := 'D';
ELSIF v_a = '14'
THEN
v_a := 'E';
ELSIF v_a = '15'
THEN
v_a := 'F';
END IF;
v_b := LTRIM (TO_CHAR (MOD (ASCII (SUBSTR (vc_url, i, 1)), 16)));
IF v_b = '10'
THEN
v_b := 'A';
ELSIF v_b = '11'
THEN
v_b := 'B';
ELSIF v_b = '12'
THEN
v_b := 'C';
ELSIF v_b = '13'
THEN
v_b := 'D';
ELSIF v_b = '14'
THEN
v_b := 'E';
ELSIF v_b = '15'
THEN
v_b := 'F';
END IF;
vc_url_temp := vc_url_temp || '%' || v_a || v_b;
END LOOP;
vc_url :=
'/reports/rwservlet?server=rep_appsrv_frhome1+'
|| vc_url_temp
|| '+report='
|| reportname
|| '+destype=Printer+desformat='
|| runformat
|| '+paramform=No+'
|| userparameters;
WEB.SHOW_DOCUMENT (vc_url, '_blank');
END; -
Hi all,
Can I use Other database as the repository, Sybase/SQL Server? Urgent!!!
And Can I use other database store business data and sync with lite?
Thanks ahead!!!Jonathan,
No, it is not possible to use any other database than Oracle (8.1.7) or later .
Oracle Lite will only work with Oracle.
Regards -
How do you display the SQL that BEx uses?
All,
I would like to display the SQL that is submitted to BEx. I understand you can perform a SQL Trace (ST05), but I want to see the SQL before is submitted to BEx. Can anyone help me.
Thanks.As Allison mentions - use RSRT, choosing Execute + Debug.
From there you will see an option, Display SQL Query, which may be what you want, it displays the SAP's Open SQL, but what you might relate better to is the Display Run Schedule, which will show the SQl as translated to the target DB environment and the Explain (execution) Plan.
Just as an FYI, ST04 is also useful for seeing the SQL and execution plans of a query that has already run. Check it out if you are not familiar with it. -
Any Way to display HTML pages on Applet
Hi All,
Is there any way to show web pages on Applet?
Is it possible ?I am not aware of a simple way to display HTML in an applet. However, I have used the JEditorPane to display HTML documents. Handling links, etc. with this component requires some effort. Also requires Swing.
Have you considered using the applet to display a page on the browser. (i.e. getAppletContext().showDocument(URL, [frame name]))? Just an idea.
Good luck. -
Display the sql statement with arguments with ojdbc14_g.jar
Hi,
I'd like to display the sql statements with ojdbc14_g.jar.
So I've followed the documentation and set an OracleLog.properties file which is linked to my java program.
The problem is the trace generated is huge and I only need the SQL requests wich are made with the arguments but I don't know how to configure that.
Have you got a sample file which handle that ?
I've tried that :
oracle.jdbc.handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=CONFIG
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
oracle.level=INFO
oracle.jdbc.driver.level=OFF
oracle.jdbc.driver.OraclePreparedStatement.level=OFF
oracle.jdbc.pool.level=OFF
oracle.jdbc.util.level=OFF
oracle.sql.level=INFO
But that doesn't display only the SQL and args :(
Regards.The fact is the statement are made by ejb entities on JBoss so I don't have a way to make specific logger to display the sql order. The only thing I can do is to set the log4j org.jboss.ejb.plugins.cmp to a trace level in order to see the sql order but without the arguments.
I tried those traces however I see stuff like that without any SQL orders :
<<
10:10:53,833 INFO [STDOUT] NFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=VIEW_ACTION_NAMES)
29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:52 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:52 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
INFO: PhysicalConnection.getCatalog()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
INFO: PhysicalConnection.getRemarksReporting()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
INFO: PhysicalConnection.getRestrictGetTables() returned false
29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()
29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
INFO: PhysicalConnection.getMetaData()
29 nov. 20>> -
SQL query question for SQL Swing Applet
Hi
I am building a little SQL Swing applet.
I was wondering if there is a SQL query statement to
find:
* The names of all the tables in the Database loaded.
* The number of tables in a database loaded.
Thank you very much in advance, A.Not positive, but check out Connection.getMetaData(). It returns a DatabaseMetaData instance that has a number of get... methods that may provide the info you need.
-
Turn off display on sql*plus and increase memory for oracle?
I want to turn off the output display on SQL*PLUS window and SPOOL the output to a file since the result is very big. i tried to SET TERM OFF but it doesn't work. Anybody knows what's the problem? or is there some other commands to use? My oracle is 9i. thx!!! And anybody knows how to increase the memory usage size for Oracle's jrew.exe? it's too slow when i try to retrieve some big size data from oracle.
I just answered this question on the OTN -> General forum. You could try the SQL*Plus startup switch -s to startup SQL*Plus in silent mode, eg:
C:\SQLPLUS -S
Alison -
Is there any way to display JTree without using applet
Hi,
is there any way to display JTree without using applet . Can we display the JTree in a JSP page.
With Regards,
Sheema.Not a JTree, per se. But there are Javascript solutions out there and there are JSP tag library solutions which use a JTree on the server side to hold and maintain the data and expanded nodes.
This is one that I've used before, it's pretty good:
http://www.jenkov.dk/treetag/introduction.tmpl -
Cannot get literal amerpsand to display in SQL output
Gurus,
Thanks so much for your help, in advance.
I'm outputting a literal string value to an output file, however, Linux isn't playing by SQL's rules. The ampersand character which I'm trying to disply as a knowledge base link is screwing up the output. Typically, the "&&" is the escape for displaying "&" in SQL output, however, this doesn't work inside a shell script.
Does anyone know the escape characters to disply the ampersand properly for the following?
I've include double ampersand, as per SQL's rules...
col Instructions3 heading "KNOWLEDGE BASE SUPPORT LINK" format a4000
select 'http://vr05a2.us.com:86/viewtopic.php?f=141&&t=2057&&p=2334&&hilit=over+pick&&sid=56b38c52bf3b36f1d17b854b29a41a3b#p2334' Instructions3
from dual;
Thanks,
Scott
Edited by: sreese on Jul 11, 2012 9:39 AM
Edited by: sreese on Jul 11, 2012 9:43 AMThe usual escape character is the backslash (\), but depending on your shell script it may be a matter of quoting the output.
For instance:
<pre>
echo "$0&&"
-bash&&
echo '$0&&'
$0&&
echo \"
echo "'"
echo \&\&
<pre> -
Problem in display file in java applet embeded browser
hi, i am facing problem to display the file from local drive in java applet embeded browser. here is the error message i get:
Exception loading file from path:java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
i think it should be the java security problem and i have try to get the solution from internet. i try to solve by using the fllowing method:
keytool -genkey -keyalg rsa -alias yourkey
keytool -export -alias yourkey -file yourcert.crt
javac yourapplet.java
jar cvf yourapplet.jar yourapplet.class
jarsigner yourapplet.jar yourkey
but the command prompt ask me to enter the keystore password. i try to enter any password. but i show me the error:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect.
So may i know what is the problem actually?Thanks a lot.Hi,
here is the sample coding :
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.behaviors.mouse.MouseRotate;
import com.sun.j3d.utils.behaviors.mouse.MouseZoom;
import com.sun.j3d.utils.behaviors.mouse.MouseTranslate;
import javax.media.j3d.*;
import javax.vecmath.*;
import java.net.URL;
import java.net.MalformedURLException;
import org.web3d.j3d.loaders.VRML97Loader;
import com.sun.j3d.loaders.Scene;
public class SimpleVrml extends Applet implements ActionListener {
String location;
String initLocation;
Canvas3D canvas;
SimpleUniverse universe;
TransformGroup vpTransGroup;
VRML97Loader loader;
View view;
Panel panel;
Label label;
BranchGroup sceneRoot;
TransformGroup examineGroup;
BranchGroup sceneGroup;
BoundingSphere sceneBounds;
DirectionalLight headLight;
AmbientLight ambLight;
TextField textField;
Cursor waitCursor;
Cursor handCursor;
public SimpleVrml() {
initLocation="cylinder.wrl";
setLayout(new BorderLayout());
GraphicsConfiguration config =SimpleUniverse.getPreferredConfiguration();
setLayout(new BorderLayout());
canvas = new Canvas3D(config);
add("Center",canvas);
panel = new Panel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT));
textField = new TextField(initLocation,60);
textField.addActionListener(this);
label = new Label("Location:");
panel.add(label);
panel.add(textField);
add("North",panel);
waitCursor = new Cursor(Cursor.WAIT_CURSOR);
handCursor = new Cursor(Cursor.HAND_CURSOR);
universe = new SimpleUniverse(canvas);
ViewingPlatform viewingPlatform = universe.getViewingPlatform();
vpTransGroup = viewingPlatform.getViewPlatformTransform();
Viewer viewer = universe.getViewer();
view = viewer.getView();
setupBehavior();
loader = new VRML97Loader();
gotoLocation(initLocation);
public void actionPerformed(ActionEvent ae) {
gotoLocation(textField.getText());
void gotoLocation(String location) {
canvas.setCursor(waitCursor);
if (sceneGroup != null) {
sceneGroup.detach();
Scene scene = null;
try {
URL loadUrl = new URL(location);
try {
// load the scene
scene = loader.load(new URL(location));
} catch (Exception e) {
System.out.println("Exception loading URL:" + e);
} catch (MalformedURLException badUrl) {
// location may be a path name
try {
// load the scene
scene = loader.load(location);
} catch (Exception e) {
System.out.println("Exception loading file from path:" + e);
if (scene != null) {
// get the scene group
sceneGroup = scene.getSceneGroup();
sceneGroup.setCapability(BranchGroup.ALLOW_DETACH);
sceneGroup.setCapability(BranchGroup.ALLOW_BOUNDS_READ);
// add the scene group to the scene
examineGroup.addChild(sceneGroup);
// now that the scene group is "live" we can inquire the bounds
sceneBounds = (BoundingSphere)sceneGroup.getBounds();
// set up a viewpoint to include the bounds
setViewpoint();
canvas.setCursor(handCursor);
void setViewpoint() {
Transform3D viewTrans = new Transform3D();
Transform3D eyeTrans = new Transform3D();
// point the view at the center of the object
Point3d center = new Point3d();
sceneBounds.getCenter(center);
double radius = sceneBounds.getRadius();
Vector3d temp = new Vector3d(center);
viewTrans.set(temp);
// pull the eye back far enough to see the whole object
double eyeDist = 1.4*radius / Math.tan(view.getFieldOfView() / 2.0);
temp.x = 0.0;
temp.y = 0.0;
temp.z = eyeDist;
eyeTrans.set(temp);
viewTrans.mul(eyeTrans);
// set the view transform
vpTransGroup.setTransform(viewTrans);
private void setupBehavior() {
sceneRoot = new BranchGroup();
examineGroup = new TransformGroup();
examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);
examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
examineGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
examineGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
sceneRoot.addChild(examineGroup);
BoundingSphere behaviorBounds = new BoundingSphere(new Point3d(),
Double.MAX_VALUE);
MouseRotate mr = new MouseRotate();
mr.setTransformGroup(examineGroup);
mr.setSchedulingBounds(behaviorBounds);
sceneRoot.addChild(mr);
MouseTranslate mt = new MouseTranslate();
mt.setTransformGroup(examineGroup);
mt.setSchedulingBounds(behaviorBounds);
sceneRoot.addChild(mt);
MouseZoom mz = new MouseZoom();
mz.setTransformGroup(examineGroup);
mz.setSchedulingBounds(behaviorBounds);
sceneRoot.addChild(mz);
BoundingSphere lightBounds =
new BoundingSphere(new Point3d(), Double.MAX_VALUE);
ambLight = new AmbientLight(true, new Color3f(1.0f, 1.0f, 1.0f));
ambLight.setInfluencingBounds(lightBounds);
ambLight.setCapability(Light.ALLOW_STATE_WRITE);
sceneRoot.addChild(ambLight);
headLight = new DirectionalLight();
headLight.setCapability(Light.ALLOW_STATE_WRITE);
headLight.setInfluencingBounds(lightBounds);
sceneRoot.addChild(headLight);
universe.addBranchGraph(sceneRoot);
public static void main(String[] args) {
new MainFrame(new SimpleVrml(), 780, 780);
cylinder.wrl :
#VRML V2.0 utf8
# A cylinder
Shape {
appearance Appearance {
material Material { }
geometry Cylinder {
height 2.0
radius 1.5
view.html:
<html>
<applet code="SimpleVrml.class" width=600 height=600>
</applet>
</html>
error msg that i get :
Exception loading file from path:java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
i can display the wrl file in applet itself but i can't display in the browser.is it any problem with my code?Urgent, please help me. Thanks. -
How can I display a DB in Applet
Hi,
I have a very hard problem with this code, he work in JBuilder, but not in IE.
Thank you in advance
Sam
package adrswingappletprj;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.sql.*;
public class ADRSwingApplet extends JApplet {
boolean isStandalone = false;
JPanel JP_Principal;
JPanel JP_Fonction, JP_Affichage;
JButton BT_Quitter, BT_Plus;
JLabel JL_Error;
JLabel JL_Nom, JL_Prenom, JL_Rue, JL_CP, JL_Ville, JL_Tel, JL_Fax, JL_Mobile, JL_Email;
JTextField JTF_Nom, JTF_Prenom, JTF_Rue, JTF_CP, JTF_Ville, JTF_Tel, JTF_Fax, JTF_Mobile, JTF_Email;
//--> Objets pour se connecter sur la DB
Connection connection = null;
Statement statement = null;
StringBuffer MaRequete;
ResultSet rs;
/**Initialiser l'applet*/
public void init() {
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
/**Initialiser le composant*/
private void jbInit() throws Exception {
//--> Top_Level_Container
JP_Principal = (JPanel) this.getContentPane();
JP_Principal.setLayout(new BorderLayout());
//--> Les deux JPanel + JL_Error
JP_Fonction = new JPanel();
JP_Affichage = new JPanel();
JP_Principal.add(JP_Fonction, BorderLayout.NORTH);
JP_Principal.add(JP_Affichage, BorderLayout.CENTER);
JL_Error = new JLabel(" ");
Font F = new Font("Comic Sans MS", Font.ITALIC, 9);
JL_Error.setFont(F);
JL_Error.setForeground(Color.red);
JP_Principal.add(JL_Error, BorderLayout.SOUTH);
//--> Le contenu JP_Fonction
JP_Fonction.setLayout(new FlowLayout());
//--> BT_Plus
BT_Plus = new JButton(" + ");
BT_Plus.setBackground(Color.pink);
BT_Plus.setToolTipText("Afficher le record suivant");
BT_Plus.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
Affiche_Next_Record();
//--> BT_Quitter
BT_Quitter = new JButton("Quitter");
BT_Quitter.setBackground(Color.orange);
BT_Quitter.setToolTipText("Cliquez ici pour Quitter");
BT_Quitter.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.exit(0);
JP_Fonction.add(BT_Plus);
JP_Fonction.add(BT_Quitter);
//--> Le contenu JP_Affichage
JP_Affichage.setLayout(new GridLayout(9, 2));
//--> Les JLabel et //--> Les JTextField
JL_Nom = new JLabel("Nom"); JTF_Nom = new JTextField();
JP_Affichage.add(JL_Nom);
JP_Affichage.add(JTF_Nom);
JL_Prenom = new JLabel("Prenom"); JTF_Prenom = new JTextField();
JP_Affichage.add(JL_Prenom);
JP_Affichage.add(JTF_Prenom);
JL_Rue = new JLabel("Rue"); JTF_Rue = new JTextField();
JP_Affichage.add(JL_Rue);
JP_Affichage.add(JTF_Rue);
JL_CP = new JLabel("CP"); JTF_CP = new JTextField();
JP_Affichage.add(JL_CP);
JP_Affichage.add(JTF_CP);
JL_Ville = new JLabel("Ville"); JTF_Ville = new JTextField();
JP_Affichage.add(JL_Ville);
JP_Affichage.add(JTF_Ville);
JL_Tel = new JLabel("Tel"); JTF_Tel = new JTextField();
JP_Affichage.add(JL_Tel);
JP_Affichage.add(JTF_Tel);
JL_Fax = new JLabel("Fax"); JTF_Fax = new JTextField();
JP_Affichage.add(JL_Fax);
JP_Affichage.add(JTF_Fax);
JL_Mobile = new JLabel("Mobile"); JTF_Mobile = new JTextField();
JP_Affichage.add(JL_Mobile);
JP_Affichage.add(JTF_Mobile);
JL_Email = new JLabel("Email"); JTF_Email = new JTextField();
JP_Affichage.add(JL_Email);
JP_Affichage.add(JTF_Email);
Connect();
//--> Config Fenetre
this.setSize(400, 300);
this.setVisible(true);
/******************* Connection sur DB *****************************/
private void Connect(){
/********* Connection sur la DB avec SQL ************/
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbc:odbc:JAVADB", "", "");
statement = connection.createStatement();
catch(ClassNotFoundException err){}
catch(SQLException err){}
/************ Requete SQL Select sur la table ADRESSE ******/
try {
MaRequete = new StringBuffer(256);
MaRequete.append("Select * from ADRESSE");
rs = statement.executeQuery(MaRequete.toString());
if (rs.next()) {
JTF_Nom.setText(rs.getString(1));
JTF_Prenom.setText(rs.getString(2));
JTF_Rue.setText(rs.getString(3));
JTF_CP.setText(rs.getString(4));
JTF_Ville.setText(rs.getString(5));
JTF_Tel.setText(rs.getString(6));
JTF_Fax.setText(rs.getString(7));
JTF_Mobile.setText(rs.getString(8));
JTF_Email.setText(rs.getString(9));
catch(SQLException err){}
public void Affiche_Next_Record(){
try {
if (rs.next()) {
JTF_Nom.setText(rs.getString(1));
JTF_Prenom.setText(rs.getString(2));
JTF_Rue.setText(rs.getString(3));
JTF_CP.setText(rs.getString(4));
JTF_Ville.setText(rs.getString(5));
JTF_Tel.setText(rs.getString(6));
JTF_Fax.setText(rs.getString(7));
JTF_Mobile.setText(rs.getString(8));
JTF_Email.setText(rs.getString(9));
else {JL_Error.setText("Fin de la Table");}
catch(SQLException err){}
/**Obtenir les informations d'applet*/
public String getAppletInfo() {
return "Information applet";
/**Obtenir les informations de param�tre*/
public String[][] getParameterInfo() {
return null;see if this works for you in IE
http://www.geocities.com/rmlchan/dba.html -
Hi,
I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display the Column names of the output to Front End. Can any one help me on this.
Example:
Sno | Sname
------- |-------------
1 ABC
2 DEF
I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
Thanks in Advance..:)Look at Re: exporting csv via pl/sql - select statement?
It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray. -
DOM parsing In Applet (URgent)
Is it possible to implement DOM parsing in Applet?
I am getting classnotfoundException .
I am giving the code below. pl read the code.
Applet.(parserapplet.java)
=========================
import java.io.*;
import java.awt.*;
import java.net.*;
import java.util.*;
import java.applet.*;
import com.security.*;
// for DOM parsing ....
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.w3c.dom.Document;
import org.w3c.dom.DOMException;
public class parserapplet extends Applet
public void init()
public void start()
try
if (Class.forName("com.ms.security.PolicyEngine") != null)
{ // required for IE
PolicyEngine.assertPermission( PermissionID.SYSTEM );
catch (Throwable cnfe)
System.out.println("Policy Engine Exception: " + cnfe);
try
String str = "<?xml
version=\"1.0\"?><html><body></body></html>";
ByteArrayInputStream bis = new
ByteArrayInputStream(str.getBytes());
System.out.println("After creating input stream");
BufferedInputStream bufIn = new BufferedInputStream(new
DataInputStream(bis));
parseXMLMessage (bufIn);
catch(Exception e){}
// Actual DOM parsing goes here.....
public void parseXMLMessage(InputStream xmlMessage)
Document document = null;
DocumentBuilder documentBuilder = null;
DocumentBuilderFactory documentBuilderFactory = null;
try
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilder = documentBuilderFactory.newDocumentBuilder();
document = documentBuilder.parse(xmlMessage);
System.out.println("Document node: " + document);
catch(FactoryConfigurationError fce)
System.out.println("Exception Factory configuration error " + fce);
catch(ParserConfigurationException pce)
System.out.println("Exception Parser configuration Exception " pce);
catch(SAXException saxe)
System.out.println("Exception SAX error " + saxe);
catch(Exception e)
System.out.println("Exception " + e);
Html code:
=========
<html>
<body>
<APPLET code="parserapplet.class" archive = "xalan.jar" width=0
height=0
MAYSCRIPT>
<param name=cabbase value=MyApplet.cab>
</APPLET>
</body>
</html>
I have signed the Applet using signcode utility and i have put the
parserapplet.class in the MyApplet cab file and signed it. On invoking
the html file, it request for permission, and after clicking yes, the
applet loads.Fine.
No problem upto this stage.
But after loading of the applet the following exception is thrown in
Javaconsole.
Exception:
=========
com.ms.security.SecurityExceptionEx[Host]: cannot access file
C:\WINNT\Java\lib\jaxp.properties
at com/ms/security/permissions/FileIOPermission.check
at com/ms/security/PolicyEngine.deepCheck
at com/ms/security/PolicyEngine.checkPermission
at com/ms/security/StandardSecurityManager.chk
at com/ms/security/StandardSecurityManager.checkRead
at java/io/File.exists
at javax/xml/parsers/DocumentBuilderFactory.findFactory
at javax/xml/parsers/DocumentBuilderFactory.newInstance
at parserapplet.parseXMLMessage
at parserapplet.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
javax.xml.parsers.FactoryConfigurationError:
java.lang.ClassNotFoundException:
org/apache/crimson/jaxp/DocumentBuilderFactoryImpl
at javax/xml/parsers/DocumentBuilderFactory.newInstance
at parserapplet.parseXMLMessage
at parserapplet.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
I dont know which .jar file to archive (i tried xalan,crimson, jaxp
but which of no use). I was surprised why the security Exception is
thrown , when parsing.
I have not accessed the System files!( but it searches for
jaxp.properties file!). I think the jar file is not downloaded. How to
verify that it is downloaded in applet?
The above code is only for sample.
If anybody who knows how to correct it please mail me at:
"[email protected]" with corrected code. I want this very
urgently.
Help meeeeeeeeeeeeeeeeeeee!!!!!
Prasanna.Have you found the answer to this problem? I am having a similar problem when running the parser in an ActiveX Bean.
THanks
Maybe you are looking for
-
Moving from Cinema Display to MBP screen.
The iTunes window when I hook up my MBP to my Cinema Display is full screen. When I use my MBP out and about the iTunes window is bigger then the screen and i can't get down to the resize handle and other items sited at the bottom of the screen. How
-
Is there a way to clean up data without restore and backup?
I noticed recently that too much data is being silently stored on my iPad possibly be apps and caches. Isn't iOS supposed to clean up data as it needs free storage? most recently, according to usage in settings > general, I had 1.8 GB of free space.
-
Sub contracting open oreder quantity
hi mm gurus this is an urgent requirement from, my client for x material i was made a subcontracting PO ORDER uantity was say 2000 deliverd quantity was 1500 rest of the 500 nos tobe deliverad on 30th agust ie, OPEN ORDER QATNTIY OF 500 NOS WHITH del
-
VENDOR and Customer master Authorization
Hi Experts I have requirement about vendor & customer master authorization.client requirement is if a user had created vendor or customer under a purchase organization or sales organization so in this case other Purchase org users shouldn't see any
-
Why am I told that fonts are not available when the file was originally created in Fireworks?
I get the "Fonts not available" message when I open up a document, i.e. open up a png document in the program/computer/etc. where the program was created in the first place. I don't get this. How can the fonts not be available when I'm using the same