Layouts in java
Ive just created a simple program, using AWT GUI. I created two versions, each one using the "Border Layout" but done one extending a Panel and the other extending a Frame. I placed a TextArea in the south part of a panel, and then added the panel to the "South", in both the Frame version and the Panel version. I wanted to position the TextArea with a gap from the bottom of the program, but I could only achieve this in the Panel version. Any ideas of how to do it it the Frame version? Any help appreciated. I would post the code as well, but there are several classes assoociated with it!
Add a panel to the south. Or set your layout as "null" and try the programme using setBounds methods. A few examples are here http://www.javagalaxy.com:8080/Java.jsp
Similar Messages
-
Layout controller java class file
Hi all
I want to edit a layout controller java class file.
When I click on edit button, it shows me the path of the layout controller java class file.
Anybody can tell me the location from where I can download this java file.
I have followed this thread discussion, please refer following link:
https://forums.sdn.sap.com/thread.jspa?threadID=83494
Regards
KapilHi Romano and Robert
The concept of 'hot deployment' is still a bit unclear to me in terms of implementation. I followed the links provided by you but they explained theory and no steps to implement it.
I however followed this blog link : http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5800
"Flexible UI component development demystified" by Thilo.
I downloaded his sample project : https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/3091fdd3-a999-2910-f18f-eae1386d2ae0
I imported it in my studio, replaced appropriate jar files to get it in rebuildable state and then deployed it on portal.
After deployement and restarting the server, I created and applied the new layout controller to the layout set of KM iview.
This time however a blank KM page was displayed.
I checked the deploy messages in NWDS, it showed me following warning and info messages:
1. com.sap.portal.plugins.config-archiver: Config archive successfully created (time to export 578 ms)
2. com.sap.portal.plugins.config-archiver: Invalid structure (missing /FlexibleUIComponents/src.config/install/meta/expanded folder)
3. com.sap.portal.plugins.config-archiver: No privateArchive.properties file is defined.
Please note, I have not modified anything in the downloaded sample project, just fixed it with required jar files picked up from the server directories.
I am using SP15 NWDS and EP server is 7.00SP16.
As a beginner, I just want to first get this downloaded sample project implementation correct.
Please let me know corrections/pointers for this. It would be highly appreciated.
Thanks
Kapil. -
Java.swing is there anyway to use coordinate based layout in java
i'm new to java and swing and all this gridlayout thing is starting to iritate me well not starting i'm fedup of that. i used to like my simple coordinate based layout system from wxpython, and even that of C# , so is there anyway to do that in Java. and whenever i try to add more than one wigit to the frame using frame.getcontentpane().add(wigit) one widit is displayed over the other, plus none of the methods for those wigits work, when i use setbounds i see no change in the wigits and so on. u can ask for my source code i can send it for u if u like.
You can use absolutes, but your shouldn't.
Try usign a combination of BoxLayouts and BorderLayouts and you should be able to do anything. Just realize that only one component can be placed in one location, and if you need more, then add a sub JPanel, and add more components there.
http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html -
In .java add elements to .jsp
Hello!
I'm just beginning and can't understand one thing:
When I create JSPDynPage, system create JSP and JAVA file - it's clear. Then I add elements to form in JSP, for example, Layout.
Can I add, for example, row into that Layout in .java file?
.JSP:
<hbj:form>
<hbj:formLayout
id="myLayout"
width="100%">
<hbj:formLayoutRow
id="Row1">
<hbj:formLayoutCell
id="Cell11"
align="LEFT"
width="100%">
<hbj:textView
id="welcome_message"
text="May the force be with you unknown user"
design="HEADER1" />
</hbj:formLayoutCell>
</hbj:formLayoutRow>
</hbj:formLayout>
</hbj:form>
.JAVA:
public void doProcessBeforeOutput() throws PageException {
this.setJspName("myjsp.jsp");
Form Reg_Form = null;
FormLayout RF_All = new FormLayout();
Tray Left_Tray1 = new Tray("TrayRules1");
Reg_Form = (Form)this.getForm();
RF_All = (FormLayout) this.getComponentByName("myLayout");
for (int i = 1; i <= 3; i++ ) { RF_All.addRow(); }
Left_Tray1.setTitle("Sample Title");
Left_Tray1.setWidth("100%");
TextView Left_Tray1_text = new TextView("Left_Tray1_text");
Left_Tray1_text.setText("Sample Text");
Left_Tray1_text.setEncode(false);
Left_Tray1_text.setWrapping(true);
Left_Tray1.addComponent(Left_Tray1_text);
RF_All.addComponent(2,1, Left_Tray1);
Reg_Form.addComponent(RF_All);
That code don't display Tray in page...Paul,
I suggest you not to add the your business logic in that auto generated file.
Instead you can have seperate java file or any Bean.
Since you are writing the logic for layout you can add the code in the jsp file
itself.
If you are using HTMLB Then keep the auto generated code in the jsp otherwise remove the code and keep the file as jsp meaning you use the html, javascript,
jsp code in the .jsp file itself.
you can add the java code in the jsp
<% String strName = "SAP"; %>
<sc ript>
al ert("<%=strName%>");
</sc ript>
Ram -
hello java fanatics! :D
im a vb programmer and created an ActiveX Printer Control. this ActiveX is downloaded on the client browsers (IE) and called by my vbscript for me to access its functions. but my problem is that... it only works on IE!
one of my friend told me that the only way i can resolve this issue is recode my ActiveX Printer Control in JAVA (applet). i've done some research about it but i cant find a specific tutorial on how can i print on the client side using JAVA applet.
i've done some CSS reports but my reports should be 8.5 X 5.5 inch. is it possible also to set some custom page layout in JAVA?It seems that you already have the material to be printed in the final format and you just want to send them to the printer.
If you want to do printing yourself you can use java print api
its in java.awt.print and javax.print packages.
If you search for tutorials for java print api you'll get what you want.
But if you want just to get the job done the best way is to write a serverside program (a Servlet) to display the content that need to be printed on the browser. So the user can directly use File->Print command or you can even put a print button on the page which executes the javascript print command
or just execute it automatically by adding a javascript at the bottom of the page. -
Change Headings in Excell sheet in BSP Layout
Hi,
How to Change Headings in Excell sheet in BSP Layout?
Thanks
SrinivasHi Anhubav,
R/3 data sent to BW report -> excell sheet displaying in Bps layout in BSP Layout using Java script code Excell sheet layout headings are how to find out
Thanks
Srinivas -
NullPointerException in TableCell.java
I get the error shown below consistently, but I can't quite pinpoint where in my own code the problem originates, as it seems to come from the rendering thread. I seems that it is sort of related to clearing and then repopulating a TableView.
If this is an unknown issue I'll try to put together a simple reproducable example.
SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'com.sun.javafx.scene.control.skin.TableRowSkin' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
java.lang.NullPointerException
at javafx.scene.control.TableCell.updateItem(TableCell.java:475)
at javafx.scene.control.TableCell.access$000(TableCell.java:44)
at javafx.scene.control.TableCell$1.invalidated(TableCell.java:76)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:140)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
at javafx.beans.property.ReadOnlyIntegerWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:154)
at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:120)
at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:89)
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:122)
at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:91)
at com.sun.javafx.scene.control.skin.TableRowSkin.updateCells(TableRowSkin.java:224)
at com.sun.javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:67)
at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at javafx.scene.control.Control.loadSkinClass(Control.java:896)
at javafx.scene.control.Control.impl_cssSet(Control.java:974)
at javafx.scene.control.Labeled.impl_cssSet(Labeled.java:604)
at javafx.scene.Node.impl_cssSet(Node.java:6320)
at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:711)
at javafx.scene.Node.impl_processCSS(Node.java:6194)
at javafx.scene.Parent.impl_processCSS(Parent.java:965)
at javafx.scene.control.Control.impl_processCSS(Control.java:1002)
at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1367)
at com.sun.javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1270)
at com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1293)
at com.sun.javafx.scene.control.skin.VirtualFlow$3.run(VirtualFlow.java:442)
at com.sun.javafx.scene.control.skin.VirtualFlow$3.run(VirtualFlow.java:440)
at com.sun.javafx.scene.control.skin.PositionMapper.computeViewportOffset(PositionMapper.java:122)
at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:827)
at javafx.scene.Parent.layout(Parent.java:900)
at javafx.scene.Scene.layoutDirtyRoots(Scene.java:451)
at javafx.scene.Scene.doLayoutPass(Scene.java:424)
at javafx.scene.Scene.access$2800(Scene.java:132)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1750)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:398)
at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:330)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
at java.lang.Thread.run(Thread.java:662)
SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'com.sun.javafx.scene.control.skin.TableRowSkin' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
java.lang.NullPointerException
at javafx.scene.control.TableCell.updateItem(TableCell.java:475)
at javafx.scene.control.TableCell.access$000(TableCell.java:44)
at javafx.scene.control.TableCell$1.invalidated(TableCell.java:76)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:140)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
at javafx.beans.property.ReadOnlyIntegerWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:154)
at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:120)
at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:89)
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:122)
at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:91)
at com.sun.javafx.scene.control.skin.TableRowSkin.updateCells(TableRowSkin.java:224)
at com.sun.javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:67)
at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at javafx.scene.control.Control.loadSkinClass(Control.java:896)
at javafx.scene.control.Control.impl_cssSet(Control.java:974)
at javafx.scene.control.Labeled.impl_cssSet(Labeled.java:604)
at javafx.scene.Node.impl_cssSet(Node.java:6320)
at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:711)
at javafx.scene.Node.impl_processCSS(Node.java:6194)
at javafx.scene.Parent.impl_processCSS(Parent.java:965)
at javafx.scene.control.Control.impl_processCSS(Control.java:1002)
at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1367)
at com.sun.javafx.scene.control.skin.VirtualFlow.addLeadingCells(VirtualFlow.java:875)
at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:831)
at javafx.scene.Parent.layout(Parent.java:900)
at javafx.scene.Scene.layoutDirtyRoots(Scene.java:451)
at javafx.scene.Scene.doLayoutPass(Scene.java:424)
at javafx.scene.Scene.access$2800(Scene.java:132)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1750)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:398)
at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:330)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
at java.lang.Thread.run(Thread.java:662)Complete application that consistently produces the error below.
Click "Run", then click on one of the groups, then click "Run" again. Prepare for an avalanche of exceptions.
package tablecellbug;
import com.sun.javafx.collections.ObservableListWrapper;
import java.util.ArrayList;
import java.util.List;
import javafx.application.Application;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Orientation;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
import javafx.util.Callback;
public class TableCellBug extends Application {
public static void main(String[] args) {
Application.launch(args);
class Person {
int id;
String name;
public Person(int id, String name) {
this.id = id;
this.name = name;
class PersonTableView extends TableView<Person> {
TableColumn<Person, Integer> idColumn = new TableColumn<Person, Integer>();
TableColumn<Person, String> nameColumn = new TableColumn<Person, String>();
public PersonTableView() {
super();
idColumn.setText("Id");
idColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, Integer>, ObservableValue<Integer>>() {
public ObservableValue<Integer> call(TableColumn.CellDataFeatures<Person, Integer> p) {
return new ReadOnlyObjectWrapper<Integer>(p.getValue().id);
nameColumn.setText("Name");
nameColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
return new ReadOnlyObjectWrapper<String>(p.getValue().name);
getColumns().addAll(idColumn, nameColumn);
final ListView<List<Person>> groupsView = new ListView<List<Person>>();
final PersonTableView personsView = new PersonTableView();
@Override
public void start(Stage stage) {
BorderPane bp = new BorderPane();
HBox toolbar = new HBox(10);
Button go = new Button("Run");
toolbar.getChildren().add(go);
bp.setTop(toolbar);
SplitPane results = new SplitPane();
results.setOrientation(Orientation.HORIZONTAL);
results.getItems().addAll(groupsView, personsView);
bp.setCenter(results);
groupsView.setCellFactory(new Callback<ListView<List<Person>>, ListCell<List<Person>>>() {
public ListCell<List<Person>> call(ListView<List<Person>> p) {
return new ListCell<List<Person>>() {
@Override
public void updateItem(List<Person> item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !item.isEmpty()) setText(item.get(0).name + "'s group");
groupsView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<List<Person>>() {
public void changed(ObservableValue<? extends List<Person>> ov, List<Person> oldGroup, List<Person> newGroup) {
if (newGroup != null) {
personsView.setItems(new ObservableListWrapper<Person>(newGroup));
else {
personsView.setItems(null);
go.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
makeSomeData();
Scene scene = new Scene(bp, 1024, 768);
stage.setScene(scene);
stage.show();
public void makeSomeData() {
groupsView.setItems(null);
System.out.println("Removed old");
List<List<Person>> groups = new ArrayList<List<Person>>();
List<Person> group1 = new ArrayList<Person>();
group1.add(new Person(1, "Tom"));
group1.add(new Person(2, "Bob"));
group1.add(new Person(3, "John"));
group1.add(new Person(4, "Fred"));
List<Person> group2 = new ArrayList<Person>();
group2.add(new Person(10, "Ann"));
group2.add(new Person(20, "Lisa"));
group2.add(new Person(30, "Mona"));
group2.add(new Person(40, "Nina"));
groups.add(group1);
groups.add(group2);
groupsView.setItems(new ObservableListWrapper<List<Person>>(groups));
System.out.println("Added new");
} -
Newbie Q: Does Portal allow StyleSheets and imbedded Java Applets
Hi All,
Thanks for your time toi read my post.
We currently have a requirement to store Military Operations Analysis data for our simulation studies. Our broad requirements cover:
1, Storing and presenting country data including sub catergories such as: Current Government; Military Orders of Battle; Base Locations and details etc. Basically organised document relation storage.
2, Storing and presenting detailed platform data (aircraft, ships etc) down to the individual field level, including sub system data such as senor and weapon system details. This needs to be done in such a way that our Visual and Analysis sub systems can extract specific fields of data from the Database (such as ranges, fuel loads etc). At the "Portal" level it just needs a nice user interface to enter in this large amount of data aswell as view it nicely.
With the country data we wish to enter data in at the sub catergory level. Such that the document included will only detail information about that sub catergory such as demographics. We then need a way to display this information based in a template or style sheet, when displayed overviews can be seen. An example might be for a country overview template we may define for the HTML page to show:
+ top left of the page has the country map (image)
+ top right the text of the country
+ First 10 lines are on the government, (with a more button to see the whole document)
+ Next 10 lines are military power, (with a more button to see the whole document)
+ etc.
For the detail platform data we need some nice GUIs to enter in these moderately large amounts of data (approxmately 30 fields per sub system, ~3-7 sub systems to a platform). Perhaps some tabbed layouts using Java widgets or Dynamic HTML to ease the viewing and entering of the data. From our trials with WebDB, using HTML forms did not work at all.
Given your knowledge of Oracle Portal, how hard is to generate dynamic HTML as per the ideals for the country data and are Java inserts fairly easy to acheive working with the Oracle database backend?
Thanks for your time,
A direct email would be appreciated aswell as posting to the group.
Shane Arnott
Boeingseems some exception from Hrxssce_Pernr_Grp_Info... you might like to look at group configuration for expense report. this is either some missing data for employee or missing configuration for this set of employee.
Cheers -
BUG : JDev 10.1.3 SR2 hangs when opening a java files
Hi,
think I've found a bug. I'm using JDev 10.1.3, patched with SR1 & 2, my machine is a Windows XP SP2 box with 1GB mem and Intel Pentium 4 2.60 Ghz with HT.
When I try to open a file in the Java editor the IDE hangs. Launching jdev.exe I can see that the following output is continuously printed:
Exception occurred updating RowMap: 16
startRow: 0
numRows: 1
startLine: 0
numLines: 15
_rowCount: 15
lineCount: 15
Stack trace follows
java.lang.ArrayIndexOutOfBoundsException: 16
at oracle.javatools.buffer.ArrayLineMap.getLineEndOffset(ArrayLineMap.java:326)
at oracle.javatools.editor.BasicView$LineRowMap.recalculateLineWidths(BasicView.java:3576)
at oracle.javatools.editor.BasicView$LineRowMap.recalculateRows(BasicView.java:3487)
at oracle.javatools.editor.BasicView$LineRowMap.handleInsert(BasicView.java:3315)
at oracle.javatools.editor.BasicView$LineRowMap.rebuildRowMap(BasicView.java:3286)
at oracle.javatools.editor.BasicView$LineRowMap.<init>(BasicView.java:3259)
at oracle.javatools.editor.BasicView$FoldedRowMap.<init>(BasicView.java:3966)
at oracle.javatools.editor.BasicView.updateMetrics(BasicView.java:1128)
at oracle.javatools.editor.BasicView.getPreferredSpan(BasicView.java:1730)
at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1257)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:819)
at oracle.javatools.editor.BasicEditorUI.getPreferredSize(BasicEditorUI.java:158)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1227)
at javax.swing.JViewport.getViewSize(JViewport.java:1003)
at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:264)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.viewportStateChanged(BasicScrollPaneUI.java:855)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:797)
at javax.swing.JViewport.fireStateChanged(JViewport.java:1357)
at javax.swing.JViewport.setView(JViewport.java:975)
at oracle.ideimpl.editor.SplitPane.setEditorComponent(SplitPane.java:343)
at oracle.ideimpl.editor.SplitPane.attachEditor(SplitPane.java:949)
at oracle.ideimpl.editor.SplitPane.attachCurrentEditor(SplitPane.java:919)
at oracle.ideimpl.editor.SplitPane.setCurrentEditorStatePos(SplitPane.java:1138)
at oracle.ideimpl.editor.SplitPane.setSplitPaneState(SplitPane.java:207)
at oracle.ideimpl.editor.TabGroup.attachCurrentNode(TabGroup.java:517)
at oracle.ideimpl.editor.TabGroup.setCurrentTabGroupState(TabGroup.java:1294)
at oracle.ideimpl.editor.TabGroup.activateEditor(TabGroup.java:639)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1273)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1131)
at oracle.ideimpl.editor.EditorManagerImpl.whenOpenEditor(EditorManagerImpl.java:2332)
at oracle.ideimpl.editor.EditorManagerImpl.handleDefaultAction(EditorManagerImpl.java:1893)
at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:343)
at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1504)
at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:1841)
at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:1862)
at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:176)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Forcing RowMap rebuild
I also disabled ALL extension and removed the jar files in jdev/extension, except the one that was originally included in the 10.1.3 and those that seems related to the service releases.
The file I'm trying to open is done like this:
--- start after this line ---
package com.websiteitalia.jsftest.view.controllers.people.list;
import com.websiteitalia.jsftest.model.list.people.PeopleListUtil;
import com.websiteitalia.jsftest.view.controllers.BaseListBacker;
import com.websiteitalia.weblib.ejb.list.IWSList;
public class PeopleListBacker extends BaseListBacker {
public IWSList getListRemote() throws Exception {
return PeopleListUtil.getList();
--- end before this line ---
I include also an HEX encoding of the file:
00000000h: 70 61 63 6B 61 67 65 20 63 6F 6D 2E 77 65 62 73 ; package com.webs
00000010h: 69 74 65 69 74 61 6C 69 61 2E 6A 73 66 74 65 73 ; iteitalia.jsftes
00000020h: 74 2E 76 69 65 77 2E 63 6F 6E 74 72 6F 6C 6C 65 ; t.view.controlle
00000030h: 72 73 2E 70 65 6F 70 6C 65 2E 6C 69 73 74 3B 0D ; rs.people.list;.
00000040h: 0A 0D 0A 69 6D 70 6F 72 74 20 63 6F 6D 2E 77 65 ; ...import com.we
00000050h: 62 73 69 74 65 69 74 61 6C 69 61 2E 6A 73 66 74 ; bsiteitalia.jsft
00000060h: 65 73 74 2E 6D 6F 64 65 6C 2E 6C 69 73 74 2E 70 ; est.model.list.p
00000070h: 65 6F 70 6C 65 2E 50 65 6F 70 6C 65 4C 69 73 74 ; eople.PeopleList
00000080h: 55 74 69 6C 3B 0D 0A 69 6D 70 6F 72 74 20 63 6F ; Util;..import co
00000090h: 6D 2E 77 65 62 73 69 74 65 69 74 61 6C 69 61 2E ; m.websiteitalia.
000000a0h: 6A 73 66 74 65 73 74 2E 76 69 65 77 2E 63 6F 6E ; jsftest.view.con
000000b0h: 74 72 6F 6C 6C 65 72 73 2E 42 61 73 65 4C 69 73 ; trollers.BaseLis
000000c0h: 74 42 61 63 6B 65 72 3B 0D 0A 69 6D 70 6F 72 74 ; tBacker;..import
000000d0h: 20 63 6F 6D 2E 77 65 62 73 69 74 65 69 74 61 6C ; com.websiteital
000000e0h: 69 61 2E 77 65 62 6C 69 62 2E 65 6A 62 2E 6C 69 ; ia.weblib.ejb.li
000000f0h: 73 74 2E 49 57 53 4C 69 73 74 3B 0D 0A 0D 0A 0D ; st.IWSList;.....
00000100h: 0A 70 75 62 6C 69 63 20 63 6C 61 73 73 20 50 65 ; .public class Pe
00000110h: 6F 70 6C 65 4C 69 73 74 42 61 63 6B 65 72 20 65 ; opleListBacker e
00000120h: 78 74 65 6E 64 73 20 42 61 73 65 4C 69 73 74 42 ; xtends BaseListB
00000130h: 61 63 6B 65 72 20 7B 0D 0A 20 20 20 20 0D 0A 20 ; acker {.. ..
00000140h: 20 20 20 70 75 62 6C 69 63 20 49 57 53 4C 69 73 ; public IWSLis
00000150h: 74 20 67 65 74 4C 69 73 74 52 65 6D 6F 74 65 28 ; t getListRemote(
00000160h: 29 20 74 68 72 6F 77 73 20 45 78 63 65 70 74 69 ; ) throws Excepti
00000170h: 6F 6E 20 7B 0D 0A 20 20 20 20 20 20 20 20 72 65 ; on {.. re
00000180h: 74 75 72 6E 20 50 65 6F 70 6C 65 4C 69 73 74 55 ; turn PeopleListU
00000190h: 74 69 6C 2E 67 65 74 4C 69 73 74 28 29 3B 0D 0A ; til.getList();..
000001a0h: 20 20 20 20 7D 0D 0A 20 20 20 20 0D 0A 7D 0D 0A ; }.. ..}..
Note the last empty line before the end-of-file. If I try to past this code into a Java file and open it in JDev, it hangs as described.
Moreover, if I remove the last empty line, JDev will open the file in the editor but, as soon as I enter it again (placing the cursor at the end of the file a hitting enter) JDev hangs again.
A final note: I experienced many hangs also in JSP editor, especially selecting a block of text and pasting something in its place, but don't know if the two behaviours are related.Ok, maybe I've tracked down at least one factor that makes JDev hang. I changed my font back to the default "DialogInput" instead of "Lucida Console" and now it opens my file.
This is the settings that works in system/oracle.jdeveloper.10.1.3.36.73/preferences.xml
<Item>
<Key>FontSizeOptions</Key>
<Value class="oracle.ide.ceditor.options.FontSizeOptions">
<fontFamily>DialogInput</fontFamily>
<fontSize>12</fontSize>
<showOnlyFixedWidth>false</showOnlyFixedWidth>
</Value>
</Item>
With this one it hangs:
<Item>
<Key>FontSizeOptions</Key>
<Value class="oracle.ide.ceditor.options.FontSizeOptions">
<fontFamily>Lucida Console</fontFamily>
<fontSize>12</fontSize>
<showOnlyFixedWidth>false</showOnlyFixedWidth>
</Value>
</Item>
Logging the exception
Exception occurred updating RowMap: 16
startRow: 0
numRows: 1
startLine: 0
numLines: 15
_rowCount: 15
lineCount: 15
Stack trace follows
java.lang.ArrayIndexOutOfBoundsException: 16
at oracle.javatools.buffer.ArrayLineMap.getLineEndOffset(ArrayLineMap.java:326)
at oracle.javatools.editor.BasicView$LineRowMap.recalculateLineWidths(BasicView.java:3576)
at oracle.javatools.editor.BasicView$LineRowMap.recalculateRows(BasicView.java:3487)
at oracle.javatools.editor.BasicView$LineRowMap.handleInsert(BasicView.java:3315)
at oracle.javatools.editor.BasicView$LineRowMap.rebuildRowMap(BasicView.java:3286)
at oracle.javatools.editor.BasicView$LineRowMap.<init>(BasicView.java:3259)
at oracle.javatools.editor.BasicView$FoldedRowMap.<init>(BasicView.java:3966)
at oracle.javatools.editor.BasicView.updateMetrics(BasicView.java:1128)
at oracle.javatools.editor.BasicView.getPreferredSpan(BasicView.java:1730)
at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1257)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:819)
at oracle.javatools.editor.BasicEditorUI.getPreferredSize(BasicEditorUI.java:158)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1227)
at oracle.javatools.editor.gutter.LineGutterPlugin.getRowCount(LineGutterPlugin.java:1485)
at oracle.javatools.editor.gutter.LineGutterPlugin.getPreferredSize(LineGutterPlugin.java:890)
at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:690)
at java.awt.Container.preferredSize(Container.java:1558)
at java.awt.Container.getPreferredSize(Container.java:1543)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78)
at java.awt.Container.preferredSize(Container.java:1558)
at java.awt.Container.getPreferredSize(Container.java:1543)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:717)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at java.awt.Window.show(Window.java:515)
at oracle.ideimpl.MainWindowImpl.show(MainWindowImpl.java:572)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at oracle.ideimpl.MainWindowImpl$2.runImpl(MainWindowImpl.java:773)
at oracle.javatools.util.SwingClosure$1Closure.run(SwingClosure.java:50)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Forcing RowMap rebuild -
Is FOP the best way to create PDFs in java?
hi,
Is using FOP the best way to create PDFs in Java? I played with it for a while and it looks really cool.
I think FOP is more flexible than iText since it uses XML and XSL to generate PDF files. In iText, you probably will have to hard code all the styles and layouts in java.
Any other thoughts?We have a commercial alternative to FOP that might do the job - our Report Generator at http://big.faceless.org/products/report can take XML documents and convert them to PDF. Like FOP it uses CSS2, but instead of the XSL-FO tags it uses basically the same tags as HTML. There's a free trial download available so you can give it a try and see if it fits your needs.
Cheers... Mike
Mike Bremford - CTO mike(at)big.faceless.org
Big Faceless Organization http://big.faceless.org -
Hi all!
Why Java sources, written with 1.5 syntax and succefully installed and running into 11.2 DB show MAJOR=48 (means 1.4.2) in select * from all_java_classes?Feel silly for not posting this before. Here's the stack trace.
java devtoolFeb 24, 2004 12:16:00 AM java.util.prefs.FileSystemPreferences$3 run
WARNING: Could not create system preferences directory. System preferences are unusable.
java.lang.ArrayIndexOutOfBoundsException: 1
at javax.swing.SizeRequirements.expandedTile(SizeRequirements.java:355)
at javax.swing.SizeRequirements.calculateTiledPositions(SizeRequirements.java:299)
at javax.swing.SizeRequirements.calculateTiledPositions(SizeRequirements.java:246)
at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:381)
at java.awt.Container.layout(Container.java:1017)
at java.awt.Container.doLayout(Container.java:1007)
at java.awt.Container.validateTree(Container.java:1089)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validate(Container.java:1064)
at java.awt.Window.pack(Window.java:433)
at expansionPanel.pack(expansionPanel.java:50)
at expansionPanel.initRows(expansionPanel.java:82)
at expansionPanel.<init>(expansionPanel.java:45)
at expansionPanel.<init>(expansionPanel.java:63)
at devtool.getNewExpansionPanel(devtool.java:316)
at devtool.initOtherComponents(devtool.java:121)
at devtool.<init>(devtool.java:20)
at devtool.main(devtool.java:342)
Fatal error using pack() callback workaround in expansionPanel
1 -
Line, Node Layout algorithms
Does flex provide any support for layouts. Say I have a
couple of nodes connected by lines. Can flex automatically draw
these using some built-in layouts like orthogonal, hierarchial
etc., or on some criteria that causes a minimal number of line
intersections etc.,
There are third party libraries that do these layouts for
Java swing applications. I am looking for similar support in flex.hi,
take a look at http://www.yworks.com/ - they have a very good java graph drawing library, which can create automatic layouts (among which are sugiyama styles and related styles)
you may download an evaluation version, or use the free online graph editor yEd (using webstart) which demonstrates a lot of the available layouts. Additionally, they have a nice gallery of graph drawings and automatic layouts on their site... go see it
greetings, sebastian -
Installation problem od Oracle 1.8.7.0.1 on Mandrake 7.2
When attempting to launch ./runInstaller from the command line I get the following:
SIGSEGV received at bfffece8 in /mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads/libawt.so. Processing terminated
Thu Mar 29 22:11:20 2001
jre full version "JDK 1.1.8 IBM build l118-20000713 (JIT enabled: jitc)"
Operating Environment
Host : janek.test.pl.
OS Level : 2.2.17-21mdk.#12 6ro mar 28 21:01:20 CEST 2001
glibc Version : 2.1.3
No. of Procs : 1
Memory Info:
total: used: free: shared: buffers: cached:
Mem: 133795840 131465216 2330624 0 35364864 50978816
Swap: 625078272 18141184 606937088
MemTotal: 130660 kB
MemFree: 2276 kB
MemShared: 0 kB
Buffers: 34536 kB
Cached: 49784 kB
BigTotal: 0 kB
BigFree: 0 kB
SwapTotal: 610428 kB
SwapFree: 592712 kB
User Limits (in bytes except for NOFILE and NPROC) -
RLIMIT_FSIZE : infinity
RLIMIT_DATA : infinity
RLIMIT_STACK : 2088960
RLIMIT_CORE : 0
RLIMIT_NOFILE : 1024
RLIMIT_NPROC : 2048
Application Environment
Signal Handlers -
SIGQUIT : ignored
SIGILL : sysThreadIDump (libjava.so)
SIGABRT : sysThreadIDump (libjava.so)
SIGFPE : sysThreadIDump (libjava.so)
SIGBUS : sysThreadIDump (libjava.so)
SIGSEGV : sysThreadIDump (libjava.so)
SIGPIPE : ignored
SIGUSR1 : doSuspendLoop (libjava.so)
Environment Variables -
PWD=/mnt/vol/Disk1/install
LTDL_LIBRARY_PATH=/home/oracle/.kde/lib:/usr/lib
ORACLE_SID=ORCL
XAUTHORITY=/home/oracle/.Xauthority
WINDOWID=8388622
LC_MESSAGES=pl
HOSTNAME=janek.test.pl
LD_LIBRARY_PATH=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads:/lib:/usr/lib:/home/oracle/.kde/lib:/usr/lib
CLASSPATH=/tmp/OraInstall:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/OraInstaller.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/l ib/InstImages.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/InstHelp.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/oracleice .jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/help.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/ewt.jar:../stage/Component s/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/xmlparser.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/swingaccess.jar:/mnt/vol/Disk1/stage/Compone nts/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/rt.jar:/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/i18n.jar:/mnt/vol/Disk1/stage/Com ponents/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/math.jar:/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/classes.zip
LESSKEY=/etc/.less
LESSOPEN=|/usr/bin/lesspipe.sh %s
LANGUAGE=pl
KDEDIR=/usr
LESS=-MM
BROWSER=/usr/bin/netscape
USER=oracle
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32 :*.tar=01;31:*.tgz=01;31:*.tbz2=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lha=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm =01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:*.tiff=01;35:
LC_TIME=pl
THREADS_TYPE=native_threads
MACHTYPE=i586-mandrake-linux-gnu
HELP_BROWSER=kfmclient openProfile webbrowsing
THREADS_FLAG=native
MAIL=/var/spool/mail/oracle
INPUTRC=/etc/inputrc
BASH_ENV=/home/oracle/.bashrc
XMODIFIERS=@im=none
LANG=pl
ORACLE_BASE=/mnt/vol/ora1/app/oracle
JAVA_HOME=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux
LC_NUMERIC=pl
ORACLE_HOME=/mnt/vol/ora1/app/oracle/product/8.1.7
DISPLAY=144.144.2.79:0.0
LOGNAME=oracle
SHLVL=5
LC_CTYPE=pl
SESSION_MANAGER=local/janek.optimus.pl:/tmp/.ICE-unix/3662
SHELL=/bin/bash
USERNAME=oracle
HOSTTYPE=i586
OSTYPE=linux-gnu
HISTSIZE=1000
HOME=/home/oracle
TERM=xterm
PGDATA=/var/lib/pgsql/data
PATH=/bin:/usr/bin:/mnt/vol/ora1/app/oracle/product/8.1.7/bin:/usr/local/bin:/mnt/vol/ora1/app/oracle/product/8.1.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin: /usr/games:/home/oracle/bin:/usr/X11R6/bin:/usr/games:/usr/X11R6/bin:/usr/games:/home/oracle/bin:/usr/X11R6/bin:/usr/games:/usr/X11R6/bin:/usr/games
SECURE_LEVEL=3
LC_MONETARY=pl
RPM_INSTALL_LANG=pl
ORACLE_DOC=/mnt/vol/oracle/doc
SSH_TTY=/dev/ttyp4
LC_COLLATE=pl
LIBPATH=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads
Libraries Loaded by the JVM
<main>
libjitc.so
libzip.so
libsysresource.so
libawt.so
Current Thread Details
"main" (TID:0x402da2d8, sys_thread_t:0x804dfb0)
Native Thread State: Pid: 3803 ThreadID: 00000400 Reuse: 1 USER PRIMORDIAL RUNNING
Native Stack Data : base: bfffee40 pointer bffdf954 used(128236) free(-11500)
----- Monitors held -----
java.lang.Object@402f01d0
java.lang.Object@40402bc8
AWT Lock
----- Native stack -----
Java_sun_awt_motif_X11FontMetrics_init_stub
invokeNativeMethod
invokeLazyNativeMethod
__irem_trap5
------ Java stack ------ () prio=5 current thread
sun.awt.motif.X11FontMetrics.<init>(X11FontMetrics.java:99)
sun.awt.motif.X11FontMetrics.getFontMetrics(X11FontMetrics.java:257)
sun.awt.motif.MToolkit.getFontMetrics(MToolkit.java:243)
java.awt.Component.getFontMetrics(Component.java:1210)
oracle.ewt.lwAWT.LWComponent$PaintCtxt.getFontMetrics(Unknown Source)
oracle.ewt.painter.TextPainter._getSize(Unknown Source)
oracle.ewt.painter.TextPainter.getPreferredSize(Unknown Source)
oracle.ewt.painter.AbstractWrappingPainter.getPreferredSize(Unknown Source)
oracle.ewt.lwAWT.AbstractPainterComponent.getPreferredSize(Unknown Source)
java.awt.GridLayout.preferredLayoutSize(GridLayout.java:264)
java.awt.Container.preferredSize(Container.java:558)
java.awt.Container.getPreferredSize(Container.java:541)
java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:713)
java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:469)
java.awt.Container.preferredSize(Container.java:558)
java.awt.Container.getPreferredSize(Container.java:541)
java.awt.BorderLayout.layoutContainer(BorderLayout.java:433)
java.awt.Container.layout(Container.java:453)
java.awt.Container.doLayout(Container.java:443)
oracle.ewt.lwAWT.LWComponent.doLayout(Unknown Source)
Total Thread Count: 10
Active Thread Count: 10
JNI Thread Count: 0
Full thread dump:
"Image Fetcher 2" (TID:0x402d9e70, sys_thread_t:0x82bc360)
Native Thread State: Pid: 3816 ThreadID: 0000240a Reuse: 1 DAEMON MONITOR WAIT
Native Stack Data : base: be7ffd70 pointer be7ffaac used(708) free(116028)
----- Monitors held -----
----- Native stack -----
sysMonitorWait
monitorWait - waiting on java.util.Vector@402e49b8
java_lang_Object_wait
Java_java_lang_Object_wait_stub
invokeNativeMethod
__irem_trap5
------ Java stack ------ () prio=8
sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:94)
sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:131)
sun.awt.image.ImageFetcher.run(ImageFetcher.java:112)
"Image Fetcher 1" (TID:0x402d9fb0, sys_thread_t:0x82bc098)
Native Thread State: Pid: 3815 ThreadID: 00002009 Reuse: 1 DAEMON MONITOR WAIT
Native Stack Data : base: be9ffd70 pointer be9ffaac used(708) free(116028)
----- Monitors held -----
----- Native stack -----
sysMonitorWait
monitorWait - waiting on java.util.Vector@402e49b8
java_lang_Object_wait
Java_java_lang_Object_wait_stub
invokeNativeMethod
__irem_trap5
------ Java stack ------ () prio=8
OK
Does this mean anything to anyone?
Thanks.When attempting to launch ./runInstaller from the command line I get the following:
SIGSEGV received at bfffece8 in /mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads/libawt.so. Processing terminated
Thu Mar 29 22:11:20 2001
jre full version "JDK 1.1.8 IBM build l118-20000713 (JIT enabled: jitc)"
Operating Environment
Host : janek.test.pl.
OS Level : 2.2.17-21mdk.#12 6ro mar 28 21:01:20 CEST 2001
glibc Version : 2.1.3
No. of Procs : 1
Memory Info:
total: used: free: shared: buffers: cached:
Mem: 133795840 131465216 2330624 0 35364864 50978816
Swap: 625078272 18141184 606937088
MemTotal: 130660 kB
MemFree: 2276 kB
MemShared: 0 kB
Buffers: 34536 kB
Cached: 49784 kB
BigTotal: 0 kB
BigFree: 0 kB
SwapTotal: 610428 kB
SwapFree: 592712 kB
User Limits (in bytes except for NOFILE and NPROC) -
RLIMIT_FSIZE : infinity
RLIMIT_DATA : infinity
RLIMIT_STACK : 2088960
RLIMIT_CORE : 0
RLIMIT_NOFILE : 1024
RLIMIT_NPROC : 2048
Application Environment
Signal Handlers -
SIGQUIT : ignored
SIGILL : sysThreadIDump (libjava.so)
SIGABRT : sysThreadIDump (libjava.so)
SIGFPE : sysThreadIDump (libjava.so)
SIGBUS : sysThreadIDump (libjava.so)
SIGSEGV : sysThreadIDump (libjava.so)
SIGPIPE : ignored
SIGUSR1 : doSuspendLoop (libjava.so)
Environment Variables -
PWD=/mnt/vol/Disk1/install
LTDL_LIBRARY_PATH=/home/oracle/.kde/lib:/usr/lib
ORACLE_SID=ORCL
XAUTHORITY=/home/oracle/.Xauthority
WINDOWID=8388622
LC_MESSAGES=pl
HOSTNAME=janek.test.pl
LD_LIBRARY_PATH=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads:/lib:/usr/lib:/home/oracle/.kde/lib:/usr/lib
CLASSPATH=/tmp/OraInstall:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/OraInstaller.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/l ib/InstImages.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/InstHelp.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/oracleice .jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/help.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/ewt.jar:../stage/Component s/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/xmlparser.jar:../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expanded/lib/swingaccess.jar:/mnt/vol/Disk1/stage/Compone nts/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/rt.jar:/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/i18n.jar:/mnt/vol/Disk1/stage/Com ponents/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/math.jar:/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/classes.zip
LESSKEY=/etc/.less
LESSOPEN=|/usr/bin/lesspipe.sh %s
LANGUAGE=pl
KDEDIR=/usr
LESS=-MM
BROWSER=/usr/bin/netscape
USER=oracle
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32 :*.tar=01;31:*.tgz=01;31:*.tbz2=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lha=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm =01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:*.tiff=01;35:
LC_TIME=pl
THREADS_TYPE=native_threads
MACHTYPE=i586-mandrake-linux-gnu
HELP_BROWSER=kfmclient openProfile webbrowsing
THREADS_FLAG=native
MAIL=/var/spool/mail/oracle
INPUTRC=/etc/inputrc
BASH_ENV=/home/oracle/.bashrc
XMODIFIERS=@im=none
LANG=pl
ORACLE_BASE=/mnt/vol/ora1/app/oracle
JAVA_HOME=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux
LC_NUMERIC=pl
ORACLE_HOME=/mnt/vol/ora1/app/oracle/product/8.1.7
DISPLAY=144.144.2.79:0.0
LOGNAME=oracle
SHLVL=5
LC_CTYPE=pl
SESSION_MANAGER=local/janek.optimus.pl:/tmp/.ICE-unix/3662
SHELL=/bin/bash
USERNAME=oracle
HOSTTYPE=i586
OSTYPE=linux-gnu
HISTSIZE=1000
HOME=/home/oracle
TERM=xterm
PGDATA=/var/lib/pgsql/data
PATH=/bin:/usr/bin:/mnt/vol/ora1/app/oracle/product/8.1.7/bin:/usr/local/bin:/mnt/vol/ora1/app/oracle/product/8.1.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin: /usr/games:/home/oracle/bin:/usr/X11R6/bin:/usr/games:/usr/X11R6/bin:/usr/games:/home/oracle/bin:/usr/X11R6/bin:/usr/games:/usr/X11R6/bin:/usr/games
SECURE_LEVEL=3
LC_MONETARY=pl
RPM_INSTALL_LANG=pl
ORACLE_DOC=/mnt/vol/oracle/doc
SSH_TTY=/dev/ttyp4
LC_COLLATE=pl
LIBPATH=/mnt/vol/Disk1/stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/lib/linux/native_threads
Libraries Loaded by the JVM
<main>
libjitc.so
libzip.so
libsysresource.so
libawt.so
Current Thread Details
"main" (TID:0x402da2d8, sys_thread_t:0x804dfb0)
Native Thread State: Pid: 3803 ThreadID: 00000400 Reuse: 1 USER PRIMORDIAL RUNNING
Native Stack Data : base: bfffee40 pointer bffdf954 used(128236) free(-11500)
----- Monitors held -----
java.lang.Object@402f01d0
java.lang.Object@40402bc8
AWT Lock
----- Native stack -----
Java_sun_awt_motif_X11FontMetrics_init_stub
invokeNativeMethod
invokeLazyNativeMethod
__irem_trap5
------ Java stack ------ () prio=5 current thread
sun.awt.motif.X11FontMetrics.<init>(X11FontMetrics.java:99)
sun.awt.motif.X11FontMetrics.getFontMetrics(X11FontMetrics.java:257)
sun.awt.motif.MToolkit.getFontMetrics(MToolkit.java:243)
java.awt.Component.getFontMetrics(Component.java:1210)
oracle.ewt.lwAWT.LWComponent$PaintCtxt.getFontMetrics(Unknown Source)
oracle.ewt.painter.TextPainter._getSize(Unknown Source)
oracle.ewt.painter.TextPainter.getPreferredSize(Unknown Source)
oracle.ewt.painter.AbstractWrappingPainter.getPreferredSize(Unknown Source)
oracle.ewt.lwAWT.AbstractPainterComponent.getPreferredSize(Unknown Source)
java.awt.GridLayout.preferredLayoutSize(GridLayout.java:264)
java.awt.Container.preferredSize(Container.java:558)
java.awt.Container.getPreferredSize(Container.java:541)
java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:713)
java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:469)
java.awt.Container.preferredSize(Container.java:558)
java.awt.Container.getPreferredSize(Container.java:541)
java.awt.BorderLayout.layoutContainer(BorderLayout.java:433)
java.awt.Container.layout(Container.java:453)
java.awt.Container.doLayout(Container.java:443)
oracle.ewt.lwAWT.LWComponent.doLayout(Unknown Source)
Total Thread Count: 10
Active Thread Count: 10
JNI Thread Count: 0
Full thread dump:
"Image Fetcher 2" (TID:0x402d9e70, sys_thread_t:0x82bc360)
Native Thread State: Pid: 3816 ThreadID: 0000240a Reuse: 1 DAEMON MONITOR WAIT
Native Stack Data : base: be7ffd70 pointer be7ffaac used(708) free(116028)
----- Monitors held -----
----- Native stack -----
sysMonitorWait
monitorWait - waiting on java.util.Vector@402e49b8
java_lang_Object_wait
Java_java_lang_Object_wait_stub
invokeNativeMethod
__irem_trap5
------ Java stack ------ () prio=8
sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:94)
sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:131)
sun.awt.image.ImageFetcher.run(ImageFetcher.java:112)
"Image Fetcher 1" (TID:0x402d9fb0, sys_thread_t:0x82bc098)
Native Thread State: Pid: 3815 ThreadID: 00002009 Reuse: 1 DAEMON MONITOR WAIT
Native Stack Data : base: be9ffd70 pointer be9ffaac used(708) free(116028)
----- Monitors held -----
----- Native stack -----
sysMonitorWait
monitorWait - waiting on java.util.Vector@402e49b8
java_lang_Object_wait
Java_java_lang_Object_wait_stub
invokeNativeMethod
__irem_trap5
------ Java stack ------ () prio=8
OK
Does this mean anything to anyone?
Thanks. -
Problem with drawLine and GridLayout Manager
Hi
I am writing a piece of software that lets you design a local area network. Currently I have a JPanel with a GridLayout of 10 squares by 10 squares. Each of these grid spaces is filled with a small custom component that is blank if empty or displaying the relevant graphic to the user if a node has been placed. The difficulty that I am having is that I want to be able to draw a section of cable between nodes. As an example, when the user places a Server and a client, I want them to be able to hold down SHIFT, select the two nodes, then press a key (probably 'c') to automatically generate a run of cable between the two nodes. The software achieves this by getting the co-ordinates of the center point of the two nodes and drawing a line between them using the graphics class drawLine() method. I have all of this working fine apart from the bit where the cable needs to be drawn. The reason is that I can only create a section of cable by creating a new component and then using g.drawLine(). Fair enough. However, I can only draw within the small grid section designated by the GridLayout manager in the JPanel. What I am asking is how would I go about getting the software to draw a line between two relative co-ordinates on the screen, disregarding any positioning that the GridLayout manager tries to impose. To put it another way, how would I go about getting the software to draw a line between two absolutety specified co-ordinates, as opposed to relative co-ordinates currently being used? Any help would be greatly appeciated, thanksHere's a way to draw lines between component centers irrespective of layouts.
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
public class GridDrawing
public static void main(String[] args)
JLabel[] labels = new JLabel[100];
JPanel loPanel = new JPanel(new GridLayout(0,10));
for(int j = 0; j < labels.length; j++)
labels[j] = new JLabel(String.valueOf(j + 1), JLabel.CENTER);
labels[j].setBorder(BorderFactory.createEtchedBorder());
loPanel.add(labels[j]);
OverdrawPanel overdrawPanel = new OverdrawPanel();
CableSelector selector = new CableSelector(overdrawPanel, loPanel);
JPanel panel = new JPanel();
OverlayLayout overlay = new OverlayLayout(panel);
panel.add(overdrawPanel);
panel.setLayout(overlay);
panel.add(loPanel);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(panel);
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
class OverdrawPanel extends JPanel
List cableList;
public OverdrawPanel()
cableList = new ArrayList();
setOpaque(false);
protected void paintComponent(Graphics g)
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(Color.red);
for(int j = 0; j < cableList.size(); j++)
g2.draw((Line2D)cableList.get(j));
public void addCable(Point2D p1, Point2D p2)
Line2D line = new Line2D.Double(p1, p2);
cableList.add(line);
repaint();
public void register(CableSelector cs)
addMouseListener(cs);
class CableSelector extends MouseAdapter
OverdrawPanel overdrawPanel;
JPanel loPanel;
boolean firstPointSet;
Point2D firstPoint;
public CableSelector(OverdrawPanel op, JPanel lp)
overdrawPanel = op;
loPanel = lp;
firstPointSet = false;
overdrawPanel.register(this);
public void mousePressed(MouseEvent e)
Point p = e.getPoint();
Component[] c = loPanel.getComponents();
Rectangle r;
for(int j = 0; j < c.length; j++)
r = c[j].getBounds();
if(r.contains(p))
if(!firstPointSet)
firstPoint = new Point2D.Double(r.getCenterX(), r.getCenterY());
firstPointSet = true;
else
Point2D p2 = new Point2D.Double(r.getCenterX(), r.getCenterY());
overdrawPanel.addCable(firstPoint, p2);
firstPointSet = false;
} -
Please help: RMI and Swing/AWT issue
Hi guys, I've been having a lot of trouble trying to get a GUI application to work with RMI. I'd appreciate any help. Here's the story:
I wrote a Java application and its GUI using Netbeans. In a nutshell, the application is about performing searches. I am now at the point where I need exterior programs to use my application's search capabilities, thus needing RMI. Such exterior programs are to call methods currently implemented in my application.
I implemented RMI, and got the client --> server communication working. However, the GUI just breaks. It starts outputting exceptions, gets delayed, doesn't update properly, some parts of it stop working.... basically hysterical behavior.
Now take a look at this line within my server class:
Naming.rebind("SearchProgram", mySearchProgram);
If I take it out, RMI obviously does not work... but the application and its GUI work flawlessly. If I put it in, the RMI calls work, but the GUI's above symptoms occur again. Among the symptoms are null pointer exceptions which all look similar, are related to "AWT-EventQueue-0", and keep ocurring. Here's just snippet of the errors outputted:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(MetalScrollBarUI.java:102)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.JScrollBar.getMinimumSize(JScrollBar.java:704)
at javax.swing.ScrollPaneLayout.minimumLayoutSize(ScrollPaneLayout.java:624)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:433)
at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:375)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:400)
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:310)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:434)
at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:251)
at javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(DefaultMenuLayout.java:38)
at java.awt.Container.preferredSize(Container.java:1558)
at java.awt.Container.getPreferredSize(Container.java:1543)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
at javax.swing.JRootPane$RootLayout.layoutContainer(JRootPane.java:910)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
There are no complaints about anything within my code, it's all GUI related whenever I make a bind() or rebind() call.
Again, any help here would be great... cause this one's just beating me.
Thanks!Maybe you want to change that worker thread to
not do RMI but anything else (dummy data) to see if it really is RMI, I doubt it, I think you are updating some structures that have to do with swing GUI and hence you will hang.
Just check this out.
Maybe you are looking for
-
How do I reset my errors when trying to sync in the new version of iTunes?
Hey everyone, I experienced an error a while ago when syncing my ipod to my laptop - it would say "100 items cannot be synced, refer to itunes for further info" - I figured out I could reset my warning messages by clicking on the phone symbol ... but
-
How to create transparent text on a solid color background?
I want to create a transparent text on a solid color backround, and I need text transparency to go all the way to through the image (i.e. do not show the solid color background). I have the transparent background layer, the solid rectangle layer that
-
Write "Unknown error." Log in App Store from MacBook.
I cannot enter into AppStore only from MacBook, username and password is introduced correctly. Please, help me(
-
My MacBook used to play DVDs. I've tried several that used to work on this computer, but none work now. How can I get my MacBook to play DVDs?
-
Hello, we're using iAS SP3. We deployed a stateless session bean that has a business methods with a Vector as argument (put (vector, String)). If we call it from a servlet, it works fine. But when we try to call it from a thread, started in a standal