how i force/get gtklookandfeel java kde?


first all, controlling lilliputian an choice (but illusory exercise the libraries).



i need know required arrangement java representation desktop concentration controlling tide hallowed kde feeling feel kde. ideally, fortitude should grant me ask feeling feel looks underlying windowing component (ie: windows lnf windows, gtk lnf gnome(gtk), qt lnf kde (qt), default platforms).



under kde, configure tide kde thesis gtk applications, too. so, fortitude works gtk fine.



when i run following square formula underneath lilliputian (ubuntu 8.04), java concentration looks beautiful. integrates unequivocally good rest applications:



try {
// set component l&f
uimanager.setlookandfeel(
uimanager.getsystemlookandfeelclassname());
} catch(exception e) { //handle }


however, i run same thing underneath debian (lenny) kde, uimanager.getsystemlookandfeelclassname() advantage java default one.
if i disrespectful force gtk lnf, concentration doesn't work. fields invisible, others spin out place, all unusable:



try {
//force gtk lnf tip kde, nonetheless **it doesn't work**
uimanager.setlookandfeel("com.sun.java.swing.plaf.gtk.gtklookandfeel");
} locate (exception e) { /*handle it*/ }


i've also attempted put following code. let's user chose any accessible lnf following tries set it. steel settlement work fine. gtk doesn't. slider unequivocally messed up. list box looks dizzy disappears, nonetheless seems work. buttons menu seem ok. applicable formula shown here:



(...)
/** creates new form swingframe */
open swingframe() {

initcomponents();

//save accessible lafs combobox
cblafs.removeallitems();
uimanager.lookandfeelinfo[] lafs=uimanager.getinstalledlookandfeels();

(int i=0,t=lafs.length;i<t;i++)
{
cblafs.additem(lafs[i]);
system.out.println(lafs[i].getname());
}

}

public vacant changelookandfeel(string laf)
{
//if specified, default one
(laf==null) {
laf=uimanager.getsystemlookandfeelclassname();
}

try {
// set component l&f
uimanager.setlookandfeel(laf);
}
locate (exception e) {
// hoop exception
e.printstacktrace();
}
swingutilities.updatecomponenttreeui(this);

}

private vacant cblafsactionperformed(java.awt.event.actionevent evt) {
// todo supplement your doing formula here:
uimanager.lookandfeelinfo laf=(uimanager.lookandfeelinfo)cblafs.getselecteditem();
(laf==null)
changelookandfeel(null);
else
changelookandfeel(laf.getclassname());
}


this same component gtk applications operative (for example: firefox) expected. so:



1) blank sourroundings have java gtk lnf concentration operative underneath kde?



2) does jvm checks relapse gtk default component theme?



thanks help
luis fernando



ps->i've attempted solutions,too, such jgoodies, plain awt swt. however, representation gtk lnf best fortitude prevaricate con swt internal libraries jgoodies additional jars (also, jgoodies lnf doesn't feeling integrated representation gtk underneath gnome). awt looks abominable (motif-like) misses lots features.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?