Aqua Look and Feel
Hello everybody,
can someone show me how to use the Mac Aqua Look and Feel on Windows platform.
Thanks very much!!!!!
You can't since it uses calls to native APIs that are available only under Mac OS.
Similar Messages
-
Why is my look and feel grey and not aqua blue
Additional comment: long ago I saw Mac's with friends and the scrollbars were blue.
On my MacBook however everything is grey.
Quite different from what is shown on Wikipaedia: AQUA Look And Feel.
How come?
;JOOP!I wouldn't suggest you count on Apple returning to colored scroll bars etc. That doesn't seem to be Apple's direction, though with Jonathan Ive taking over the direction of UI for OS X and iOS, that may change. You can express your desire to Apple via their feedback page, if you wish:
http://www.apple.com/feedback/macosx.html
Regards. -
Setting Look and Feel gives error
Hi,
I get error when I use,
JFrame.setDefaultLookAndFeelDecorated(true);
cannot resolve symbol
symbol: method setDefaultLookAndFeelDecorated (boolean)
location : class javax.swing.JFrame
JFrame.setDefaultLookAndFeelDecorated(true);
^
1 error
I am running the example for JFrame in the site . PLease help!!Hi,
that was solved!
thank u 4 ur time!
Do you know how to use aqua look and feel??
I have downloaded the files. demo.bat works fine! and I tested Aqua by editing demo.bat, but how to use it i nmy program?? what is the name to be given for setLookAndFeel(??) -
Hi how to create Mac os look and feel??
hi
please tell me how to create Mac os look and feel.
thx.I've heard about a Skin look and feel, but I've never used it. Maybe you should look into that. It would probably be the easiest way to create a custom look and feel, but you won't automatically be able to use Aqua unless you're on a Mac. Sorry.
-
hi,
is MacOS X L&F for Windows platforms available?
venkatYou can use MacOS laf, but i don't think there's a MacOSX laf avaliable.
To use the MacOS you'll have to some tricks to make it avaliable... you can find these tricks in the internet (well, you just have to override the isSupportedLookAndFeel() method...)
If you want the MacOSX laf, you can use some skin, that works just like a look and feel. The SkinLF (www.l2fprod.com) lib has that "aqua" skin avaliable for free (you can find that skin and others at www.javootoo.com)
There's also another lib, called SLAF (Simple Look And Feel) that does the same thing as SkinLF. But their Aqua skin is not for free, though.
Victor. -
Get rid of that "blue" look and feel which overrides GTK?
Since Java 5 when you run on a GTK system (or a windows system if I remember correctly) you get a pale blue look and feel in Swing rather than one which looks like your usual operating system's L&F.
Can that be turned off? :)
Cheers,
ChrisThis is weird. I use getSystemLookAndFeelClassName() to set the LaF. It works on my Mac at home and I get the typical OS X Aqua appearance, but on my Ubuntu Linux system at work I just get the Ocean default LaF you mention.
I'm guessing Ubuntu have done some irritating things with the package because someone who maintains the java stuff at Ubuntu decided blue looks nice or something. I'll see if I can track this down to a problem with the JRE on my system, rather than my code.
Thanks for the help :) -
Windows look and feel instead, in InternalFrameDemo.java
Hi all, I am learning swing and I am trying to modify the
InternalFrameDemo.java source from
http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#InternalFrameDemo
My idea is to add the line
JFrame.setDefaultLookAndFeelDecorated(true); in the constructor, but it doesn't work
and I don't understand why.
Could somebody please help me?
Kindest regards,
Lasse
public InternalFrameDemo() {
super("InternalFrameDemo");
//Make the big window be indented 50 pixels from each edge
//of the screen.
int inset = 50;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setBounds(inset, inset,
screenSize.width - inset*2,
screenSize.height - inset*2);
//FDoesn't work
JFrame.setDefaultLookAndFeelDecorated(true);
//Set up the GUI.
desktop = new JDesktopPane(); //a specialized layered pane
createFrame(); //create first "window"
setContentPane(desktop);
setJMenuBar(createMenuBar());
//Make dragging a little faster but perhaps uglier.
desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
}Uh I think you're mistaken. Whenever in doubt or something doesn't work as expected, check the javadocs. The link to the javadocs can usually be found really easily by typing "java 6 classname". In this case:
http://docs.oracle.com/javase/6/docs/api/javax/swing/JFrame.html
If you want to set the Windows look & feel as your thread title suggests, this was not the method you were looking for as the javadocs will tell you. That method controls if a frame is decorated or not (as the name suggests), which it is by default. Setting it to true will not change anything.
So what then? You type into Google "java swing windows look and feel". Without quotes of course. -
Problems installing the new 'Look And Feel' done by Francios Degrelle
I have download the new verison of the new 'Look And Feel' from
http://sheikyerbouti.developpez.com/forms-pjc-bean/LAF/sources/v133/LAF_133.zip
1- I defined a new section in formsweb.cfg named summit in the middle tier (AS 10g Rel2):
[Summit]
baseHTML=base.htm
baseHTMLjinitiator=basejpi.htm
baseHTMLjpi=basejpi.htm
baseHTMLie=baseie.htm
HTMLdelimiter=%
workingDirectory=e:\app\summit
envFile=default.env
IE=JInitiator
escapeparams=true
form=customers_laf
debug=no
otherparams=buffer_records=%buffer% debug_messages=%debug_messages% array=%array% obr=%obr% query_only=%query_only% quiet=%quiet% render=%render% record=%record% tracegroup=%tracegroup% log=%log% term=%term% useSDI=yes
buffer=no
debug_messages=no
array=no
obr=no
query_only=no
quiet=yes
render=no
pageTitle=Summit
serverURL=/forms/lservlet
codebase=/forms/java
imageBase=DocumentBase
width=100%
height=100%
separateFrame=false
splashScreen=no
lookAndFeel=oracle
colorScheme=blue
logo=no
restrictedURLparams=HTMLbodyAttrs,HTMLbeforeForm,pageTitle,HTMLafterForm,log,allow_debug,allowNewConnections
serverApp=default
archive_jini=frmall_jinit.jar
archive=frmall.jar,laf.jar
WebUtilArchive=
jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_09/index.html
jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0
2- then I put a copy of the file 'forms.css' in the middle tier in the folder :
apache\apache\htdocs
so as to be on the path and then modified PM$CSS_FILENAME in all forms to be 'forms.css' instead of 'c:\forms.css' and recompiled.
3-I put a copy of the file 'laf.jar' in the folder : 'd\Ora_AS\forms\java' in the middle tier and added this path to the classpath environment variable.
4- I restarted the middle tier and wrote this URL:
http://test/forms/frmservlet/config=summit
the customers form opened but with no background images,I added the following to the URL '&form=test_laf_color_scheme.fmx',the form opened with the default color scheme to 'purple',I changed it from a drop down list to orange and all buttons background color degraded to orange.
My questions:
1-where are the background images ?
2- I cannot compile the 'laf.pll' file to 'laf.plx',when I compile I get this error:
FRm-91507 -internal error
P.S. I read this thread :
FRM-91507 when compiling a library with Forms 6i
and I didn't understand it,where do I change the Forms_Path? in the forms Home release 1 or Forms home release 2?!!!
3-Is the 'forms.css' file properly located? if not? where do I put it?
Sorry for the long scenario but I'm really confused?
Thanks
MohammadHello,
I'm curently out of everything so I cannot answer this one. All I can tell is that images are read from the client machine or jar file. If you want read images from the application server, you need the http:// syntax.
Francois -
How to change the default look and feel
Hi.
Does anyone knows how to change the default Caspian look and feel to, for example, Nimbus ?
Or the skin feature turns look and feel setting, as We know in java, unnecessary in javafx ?
I´m using javafx 1.2.
CheersCanspian is not a look&feel, it's a skin.
Look&feel only change the SwingComponent,
regards. -
Problem with java look and feel
Hi! This is my first time posting here. Do apologize me if I am not familiar with the regulations here. Thanks!
Currently, I am developing a project using NetBeans IDE. It is using RMI, and some basic UI. I am facing the following error when I tried applying the java look and feel code. Please see below for the code used and the error message.
try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception e) { }
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.plaf.ColorUIResource cannot be cast to java.util.List
at javax.swing.plaf.metal.MetalUtils.drawGradient(MetalUtils.java:196)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.paintComponent(MetalInternalFrameTitlePane.java:384)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
at javax.swing.JComponent.paint(JComponent.java:1013)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1797)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Java Result: 1Thanks for everyone's help!
Below is the executable code generated using NetBeans which is enough to generate the error message. Sometimes you can get the error message just by running the program. Sometimes the error will occur when you go into the Menu and click on Item.
* NewJFrame.java
* Created on January 8, 2008, 1:11 PM
package client;
import javax.swing.UIManager;
* @author Yang
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jDesktopPane1 = new javax.swing.JDesktopPane();
jInternalFrame1 = new javax.swing.JInternalFrame();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
jInternalFrame1Layout.setHorizontalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 190, Short.MAX_VALUE)
jInternalFrame1Layout.setVerticalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 95, Short.MAX_VALUE)
jInternalFrame1.setBounds(80, 40, 200, 130);
jDesktopPane1.add(jInternalFrame1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jMenu1.setText("Menu");
jMenuItem1.setText("Item");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
jMenu1.add(jMenuItem1);
jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE)
.addGap(20, 20, 20))
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
pack();
}// </editor-fold>
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
jInternalFrame1.setVisible(true);
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
// Variables declaration - do not modify
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JInternalFrame jInternalFrame1;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
// End of variables declaration
}Edited by: Boxie on Jan 7, 2008 11:23 PM -
Problem With ButtonUI in an Auxiliary Look and Feel
This is my first post to one of these forums, so I hope everything works correctly.
I have been trying to get an axiliary look and feel installed to do some minor tweaking to the default UI. In particular, I need it to work with Windows and/or Metal as the default UI. For the most part I let the installed default look and feel handle things with my code making some colors lighter, darker, etc. I also play with focus issues by adding FocusListeners to some components. I expect my code to work reasonably well no matter what the default look and feel is. It works well with Motif, Metal, and Windows, the only default look and feels I've tested with. What I'm going to post is a stripped down version of what I have been working on. This example makes gross changes to the JButton background and foreground colors in order to illustrate what I've encountered.
I have three source code files. The first, Problem.java, creates a JFrame and adds five buttons to it. One button installs MyAuxLookAndFeel as an auxiliary look and feel using MyAuxButtonUI for the look and feel of JButtons. The next button removes that look and feel. The next button does nothing except print a line to System.out. The next button installs MyAuxLookAndFeel as an auxiliary look and feel using MyModButtonUI for the look and feel of JButtons. The last button removes that look and feel.
The problem is, when I install the first auxiliary look and feel, buttons are no longer tabable. Also, they cannot be invoked by pressing the space button when they're in focus. When I remove the first auxiliary look and feel everything reverts to behaving normally. When I add the "Mod" version, button tabability is fine. The only difference is I've added the following code:
if ( c.isFocusable() ) {
c.setFocusable(true);
}That strikes me as an odd piece of code to profoundly change the program behavior. Anyway, after adding and removing the "Mod" look and feel, the tababilty is forever fixed. That is, if I subsequently re-install the first look and feel, tababilty works just fine.
The problem with using the space bar to select a focused button is more problematic. My class is not supposed to mess with the default look and feel which may or may not use the space bar to press the button with focus. When the commented code in MyModButtonUI is uncommented, things behave correctly. Even the statement
button.getInputMap().remove( spaceKeyStroke );doesn't mess things up after the auxiliary look and feel is removed. So far I've tested this with JRE 1.4.2_06 under Windows 2000, JRE 1.4.2_10 under Windows XP, and JRE 1.5.0_06 under Windows XP and the behavior is the same.
All of this leads me to two questions.
1. Is my approach fundamentally flawed? I've extended TextUI and ScrollBarUI with no problems. This is the only problem I've encountered with ButtonUI. My real workaround for the space bar issue is better than the one I've supplied in the example, but it certainly is not guaranteed to work for any arbitrary default look and feel.
2. Assuming I have no fundamental problems with my approach, it's possible I've found a real bug. I searched the bug database and couldn't find anything like this. Of course, this is the first time I've tried seasrching the database for a bug so my I'm doing it badly. Has this already been reported as a bug? Is there any reason I shouldn't report it?
What follows is the source code for my example. It's in three files because the two ButtonUI classes must be public in order to work. Thanks for insight you can provide.
Bill
File Problem.java:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Problem extends JFrame {
public boolean isAuxInstalled = false;
public boolean isModInstalled = false;
public LookAndFeel lookAndFeel = new MyAuxLookAndFeel();
private static int ctr = 0;
public static void main( String[] args ) {
new Problem();
public Problem() {
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(250, 150);
setTitle("Button Test");
JButton install = new JButton("Install");
JButton remove = new JButton("Remove");
JButton doNothing = new JButton("Do Nothing");
JButton installMod = new JButton("Install Mod");
JButton removeMod = new JButton("Remove Mod");
this.getContentPane().setLayout(new FlowLayout());
this.getContentPane().add(install);
this.getContentPane().add(remove);
this.getContentPane().add(doNothing);
this.getContentPane().add(installMod);
this.getContentPane().add(removeMod);
install.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( !isAuxInstalled ) {
isAuxInstalled = true;
UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
SwingUtilities.updateComponentTreeUI( Problem.this );
remove.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( isAuxInstalled ) {
isAuxInstalled = false;
UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
SwingUtilities.updateComponentTreeUI( Problem.this );
doNothing.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println( "Do nothing " + (++ctr) );
installMod.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( !isModInstalled ) {
isModInstalled = true;
UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
SwingUtilities.updateComponentTreeUI( Problem.this );
removeMod.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( isModInstalled ) {
isModInstalled = false;
UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
SwingUtilities.updateComponentTreeUI( Problem.this );
setVisible(true);
class MyAuxLookAndFeel extends LookAndFeel {
public String getName() {
return "Button Test";
public String getID() {
return "Not well known";
public String getDescription() {
return "Button Test Look and Feel";
public boolean isSupportedLookAndFeel() {
return true;
public boolean isNativeLookAndFeel() {
return false;
public UIDefaults getDefaults() {
UIDefaults table = new MyDefaults();
Object[] uiDefaults = {
"ButtonUI", (isModInstalled ? "MyModButtonUI" : "MyAuxButtonUI"),
table.putDefaults(uiDefaults);
return table;
class MyDefaults extends UIDefaults {
protected void getUIError(String msg) {
// System.err.println("(Not) An annoying error message!");
}File MyAuxButtonUI.java:
import javax.swing.*;
import java.awt.*;
import javax.swing.plaf.*;
import javax.swing.plaf.multi.*;
import javax.accessibility.*;
public class MyAuxButtonUI extends ButtonUI {
private Color background;
private Color foreground;
private ButtonUI ui = null;
public static ComponentUI createUI( JComponent c ) {
return new MyAuxButtonUI();
public void installUI(JComponent c) {
MultiButtonUI multiButtonUI = (MultiButtonUI) UIManager.getUI(c);
this.ui = (ButtonUI) (multiButtonUI.getUIs()[0]);
super.installUI( c );
background = c.getBackground();
foreground = c.getForeground();
c.setBackground(Color.GREEN);
c.setForeground(Color.RED);
public void uninstallUI(JComponent c) {
super.uninstallUI( c );
c.setBackground(background);
c.setForeground(foreground);
this.ui = null;
public void paint(Graphics g, JComponent c) {
this.ui.paint( g, c );
public void update(Graphics g, JComponent c) {
this.ui.update( g, c );
public Dimension getPreferredSize(JComponent c) {
if ( this.ui == null ) {
return super.getPreferredSize( c );
return this.ui.getPreferredSize( c );
public Dimension getMinimumSize(JComponent c) {
if ( this.ui == null ) {
return super.getMinimumSize( c );
return this.ui.getMinimumSize( c );
public Dimension getMaximumSize(JComponent c) {
if ( this.ui == null ) {
return super.getMaximumSize( c );
return this.ui.getMaximumSize( c );
public boolean contains(JComponent c, int x, int y) {
if ( this.ui == null ) {
return super.contains( c, x, y );
return this.ui.contains( c, x, y );
public int getAccessibleChildrenCount(JComponent c) {
if ( this.ui == null ) {
return super.getAccessibleChildrenCount( c );
return this.ui.getAccessibleChildrenCount( c );
public Accessible getAccessibleChild(JComponent c, int ii) {
if ( this.ui == null ) {
return super.getAccessibleChild( c, ii );
return this.ui.getAccessibleChild( c, ii );
}File MyModButtonUI.java:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.plaf.*;
public class MyModButtonUI extends MyAuxButtonUI
static KeyStroke spaceKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0 );
public static ComponentUI createUI( JComponent c ) {
return new MyModButtonUI();
public void installUI(JComponent c) {
super.installUI(c);
c.setBackground(Color.CYAN);
if ( c.isFocusable() ) {
c.setFocusable(true);
// final JButton button = (JButton) c;
// button.getInputMap().put( spaceKeyStroke, "buttonexample.pressed" );
// button.getActionMap().put( "buttonexample.pressed", new AbstractAction() {
// public void actionPerformed(ActionEvent e) {
// button.doClick();
// public void uninstallUI(JComponent c) {
// super.uninstallUI(c);
// JButton button = (JButton) c;
// button.getInputMap().remove( spaceKeyStroke );
// button.getActionMap().remove( "buttonexample.pressed" );
}here is the code used to change the current look and feel :
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
catch (InstantiationException e)
System.out.println("Error occured "+ e.toString());
catch (ClassNotFoundException e)
System.out.println("Error occured "+ e.toString());
catch (UnsupportedLookAndFeelException e)
System.out.println("Error occured "+ e.toString());
catch (IllegalAccessException e)
System.out.println("Error occured in .. " + e.toString());
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
Fenetre fen = new Fenetre();
fen.setSize(dim.width, dim.height);
fen.setResizable(false);
fen.setLocation(0, 0);
fen.setVisible(true); -
How to give BSP Iview look and feel of portal??
Hi All,
I've created a BSP application that I use to create an Iview for portal.
I thought that if i used htmlb tags that the look and feel of portal would be automatic to my app but its not.
I've tried assigning portal css classes to a html table but there's no effect.
I've previewed one of the standard ivews and viewed the source and found the path of the css file. But when i looked for it on the server, while the out folder was there (com.sap.portal.design.portaldesigndata) , there was no css files in this folder.
So i'm at a loss. In summary, how do i get my bsp app to have the portal look and feel????? I would prefer to use the css files so that if any changes are made to the standard, the changes will be reflected in my custom iviews too.
Any help, would be most welcome,
Liz.Hi Liz,
on the properties tab for the BSP application try selecting the "Supports Portal Integration" checkbox.
Cheers
Graham Robbo -
Accessing File/Folder icons for current Look and Feel
Hi,
I'm looking to get the Icon for files and folders that the current UIManager uses for some work I'm doing. Please could you help.
I'm getting strange results from the method I'm using, which is to create a temporary file and do: Icon i = FileSystemView.getFileSystemView().getSystemIcon(tempFile);
I don't like the idea of having to create a temporary file to do this - isn't there another way to do it? - for instance asking "get default file icon"/"get default folder icon".
I could download a jpg image of the file/folder icons, but this is static - and I want my method to get the icons used for the current look and feel I'm using.
There must be a simple way to do this right? I mean, java uses a method to get the icons for the current look and feel.. Oh.. Please help!
- Edd.Try these:
UIManager.getIcon("FileView.directoryIcon");
UIManager.getIcon("FileView.fileIcon");Leif Samuelsson
Java Swing Team
Sun Microsystems, Inc. -
Transparent TextField with Synth Look and Feel
I am trying to use synth to implement a textfield with a transparent background, and having some problems with it. I can see my panel and the transparent field fine enough in the beginning, but when the text in the field changes, it writes right over the previous text and becomes a pile of unreadable white marks. I've experimented with varying degrees of transparency, but you can still see the old field underneath slightly. Does anyone have any suggestions? My code is below.
Thanks.
synth.xml
<synth>
<!-- PANEL -->
<style id="panelStyle">
<state>
<imagePainter method="panelBackground" path="../../../lafImages/papyrus_bkgd.gif" sourceInsets="10 15 10 15"/>
</state>
</style>
<bind style="panelStyle" type="name" key="PAPYRUS_PANEL"/>
<!-- TEXTFIELD -->
<style id="textFieldStyle">
<font name="Kudasai" size="12"/>
<state>
<color type="TEXT_FOREGROUND" value="#FFFFFF"/>
<!-- set the alpha value for transparency in 1st two digits -->
<color type="BACKGROUND" value="#00000000"/>
</state>
<opaque value="false"/>
</style>
<bind style="textFieldStyle" type="region" key="TEXTFIELD"/>
</synth>
my tester
class SynthTester {
private JTextField field;
public SynthTester(){
initLookAndFeel();
JFrame main = new JFrame();
JPanel panel = new JPanel();
panel.setName("PAPYRUS_PANEL");
field = new JTextField(3);
field.setText("0");
panel.add(field);
JButton button = new JButton("+");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int val;
try {
val = Integer.parseInt(field.getText());
} catch( Exception ex ) {
val = 0;
val++;
field.setText(Integer.toString(val));
panel.add(button);
main.add(panel);
main.pack();
main.setVisible(true);
private void initLookAndFeel() {
SynthLookAndFeel lookAndFeel = new SynthLookAndFeel();
try {
InputStream is = getClass().getResourceAsStream("synth.xml");
if( is == null) {
System.err.println("unable to load resource stream");
} else {
lookAndFeel.load(is, getClass());
UIManager.setLookAndFeel(lookAndFeel);
} catch (Exception e) {
System.err.println("Couldn't get specified look and feel ("+ lookAndFeel+ "), for some reason.");
System.err.println("Using the default look and feel.");
e.printStackTrace();
System.exit(1);
}As its name implies, an imagePainter element creates a SynthPainter that paints from an image. For example:
<synth>
<style id="example">
<state>
<color value="white" type="BACKGROUND"/>
</state>
<imagePainter method="panelBackground" path="background.png"
sourceInsets="5 6 6 7" paintCenter="false"/>
<insets top="5" bottom="6" right="7" left="6"/>
</style>
<bind style="example" type="region" key="Panel"/>
</synth> -
I just updated iOS on my iPhone 5.
What a shock!! Where is the premium look and feel I bought my iPhone for?
If I wanted the lokale feel of iOS 7.0 I would have bought a much cheeper taiwanese smartphone.
Please let me know how I can return to the original look and feel of the iPhone surface I bought my phone for.You had plenty of time to look at screenshots on the internet and read various blog posts about iOS 7.
Maybe you are looking for
-
I bought OSX Mountain Lion 10.8.2 in the App Store. I have accidentally deleted it from my list of purchases. How can I restore it in case I need to use it again?
-
Itunes store unknown error -50 help needed
i've recently become unable to access the music, podcasts, and ping sections of the itunes store from my imac (3.06 ghz intel core 2 duo). over the same network, i can access all areas of the itunes store from other devices such as my iphone, ipad, m
-
Package-accessable class elements
Can anyone help me with a makefile problem? When I make on unix from the following makefile, classes from other files in the same package as MainHandler cannot access a non-public class in the MainHandler file. Even though they are in the same packag
-
I have a new Airport Express. I have managed to connect to the internet with it - I'm sending this post by it in fact - and yet the light on top is still flashing amber. I have to say that having switched 6 years ago, this is the first time I have be
-
I bought Turbo for my kid but the only thing that got downloaded was the iTunes extras. Is there a way to redownload the movie?