Hi! I'm sitting with a gui bug that I have been stuck with for a while. When a "view" is changed from one "view" to another, the new "view" doesn't get painted properly. The previous view is visibile randomly in the background. I can't reproduce this in the dev environment so its hard to debug, but It can easily be reproduced in a remote testlab which I don't have access to and can't remote debug from. So I was going through the code and noticed this: [code] proteted void updatebuttonsToModel() { // some code... SwingUtilities.invokeLater(new Runnable() { // some gui …

Member Avatar
Member Avatar
+0 forum 6

Hi! I'm having an issue with maven I can't figure out. I have two local projects, project1 and project2. Project1 has project2 as a dependecy as you would have any dependecy in maven declared. Everytime I make a change in project2 I have to install it into the local repository and run mvn eclipse:eclipse on project1 to get it up to date. When i debug project1 (in eclipse) and hit project2 code, the source is not avaliable (of course, unless I install with sources). So what I want is project1 to know that project2 is a local project so that …

Member Avatar
Member Avatar
+0 forum 1

Hi! I'm working with a huge software system with a lot of people being involved in the coding through many years. I'm noticing more and more that there is a lot of bad code, especially get methods here and there with huge side effects, which you totally not expect. So it crossed my mind that it would be great with a unit test that detects side effects in get methods and reports them so we can clean up that bad code. But it seems kind of difficult, you would have to analyze the code somehow and make sure that nothing …

Member Avatar
Member Avatar
+0 forum 2

Hi! I think the title is quite clear, but is there a way (I'm using Xcode 4) to auto generate the methods defined in a c++ header file to a cpp file? I just want empty methods that are compatible with the definitions in the header. Can't find anything on this. Thanks!

Member Avatar
+0 forum 0

Hi! I was wondering if there is a way to mock Date and Calendar objects for testing purposes. In other words I want to programatically be able to change what new Date() and new Calendar() etc. returns independent of the system date. Something like setting the date for the jvm or something. I have no clue how it could be done. Any thoughts?

Member Avatar
Member Avatar
+0 forum 13

I'm searching for a java library/framework that makes printing easier. By easier I mean something that makes it possible to layout and format text/images and other elements in a document by defining layouts in html/xml or something. I also want the layout to be decoupled from rendering so the document can be printed to a screen, a4 printer, receipt-printer, or in general any arbitrary device that can show a document (But mostly different kind of printers). Does anyone know of something like this? Are there any widely used libraries? Javas internal printing capabalities doesn't do much good. Have googled it …

Member Avatar
+0 forum 0

Hi! I have a JScrollPane that contains a JPanel with a CardLayout, which in turn contains two JPanels with some labels and stuff. I want the contents of the ScrollPane/ViewPort to never exceed the width of the viewport. The problem I'm having is that when a label holds a lot of text, the components inside of the scroll are not completely visible, they dissapear a little on each side. Is there a way of forcing a max size for the scrollpane or something so its contens never gets larger that the scrollspanes horizontal width?

Member Avatar
Member Avatar
+1 forum 3

Hi! I'm having some problems with my build files while running junit tests via ant. The build worked fine until a couple of days ago when I got a "process fork failed" error message. Further down in the stack trace i got: Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_25\jre\bin\java.exe" (in directory "C:\p4work\user\product\aProduct\stdproduct\6.9-MAINT\_tmp_derived\dist"): CreateProcess error=87, The parameter is incorrect From what I understad so far, the arguments passed to javac are way to long for windows to handle. I googled some and found this: [url]http://huionn.wordpress.com/2010/03/26/ant-javac-failed-with-%E2%80%9Cerror87-the-parameter-is-incorrect%E2%80%9D/[/url] Apparently there is a way to pass arguments in a file, but my problems is …

Member Avatar
Member Avatar
+0 forum 1

Hi! I'm looking for a way to only run a few tests instead of all existings JUnit test cases in our automated build, which uses ant. I can't add @ignore annotations in the code since it would take to much time. Is there a way to define which test cases/classes Junit should run during the build process? Thanks!

Member Avatar
Member Avatar
+0 forum 2

Hi! I'm writing a unit test where arbitrary objects have to be created without knowing anything about the objects (with some exceptions). I use reflection to create objects and set their fields to random values etc... I'm almost there but I've come to an issue I can't find a solution to. Say that an Object that is instansiated using reflection has a field, which is a Map<Object, Object>. I set this field to an empty map. The object has the following method: [code] public SomeObject doSomething(String aString) { SomeObject someObject = (SomeObject) map.get(aString); if(someObject == null) throw new SomeException(); return …

Member Avatar
Member Avatar
+0 forum 9

Hi! I'm wondering if there is a tool to make the following functionality in an wasy way. I have a project in eclipse and I use perforce for versioning. I want to be able to compare the project between two dates and determine which classes/packages etc. that have been added and which classes that been changed and which methods in those classes. The result should be a list or something that says: Classes Changed since 20110101 Class1 method1 edited method2 added Classes Added since 20110101 Class2 added Packages Added/Edited since 20110101 Package1 edited Package2 added Anyone know of an eclipse …

Member Avatar
+0 forum 0

Hi! I'm looking for a way to make an application (app1), separate from another java application (app2), that can acces the GUI of app2 and also listen to all events that are passed to app2. I would like to be able to get hold of the frame of app2 so I can traverse its child components. I would like to listen to all possible events from any external sources like mouse, keyboard, etc, that app2 reveices, which app1 also should recieve. Any ideas on how to do this? /S

Member Avatar
Member Avatar
+0 forum 2

Hello! I've written some swing components for which I use timing framework to make some simple animations that hopefully are going to enchance usability. What I am doing is essentially setting the bounds of JPanels for each timing event to animate something that moves and resizes. I also change transparency values during animation by using alpaComposites in the paintComponent method. The animations look good on my dev system but lags on slower systems which the software mainly will run on. I'm unsure about how I should optimize the performance of the animations. Does anyone now some place I can find …

Member Avatar
Member Avatar
+0 forum 4

Hello! I've made a custom JPanel that overrides paintComponent which paints a rounded rectangle. My problem is that when I place other components in the panel, like a JLabel, they don't get rounded corners like the panel they are in. here is my panel class: [code] private static class BackgroundPanel extends DropShadowPanel { /** Serial version UID. */ private static final long serialVersionUID = 4349330263921687004L; public BackgroundPanel() { super(); setBorder(new EmptyBorder(0,20,20,20)); } /** {@inheritDoc} */ @Override public boolean isOpaque() { return false; } @Override protected void paintComponent(Graphics g) { Graphics2D g2 = CommonUIPainter.getGraphics2D(g); super.paintComponent(g2); Insets insets = getInsets(); int x …

Member Avatar
Member Avatar
+0 forum 4

Hello! I have a swing app with lots of components and stuff. I want to place a Container/Jpanel on top of everyting else that is invisible that contains other component which are visible. I can make the panel invisible or not opaque and still show its child component but I also want the panel not to block events to underlying component. For example there is a button under the panel, the button is visible, but it can't be clicked since the panel is in the way. How do I make it so that panel doesn't block underlying components from receiving …

Member Avatar
Member Avatar
+0 forum 7

Hello! I'm trying out an idea I had which requires me to capture the contents of a java window/Frame, much like a screenshot but without the window and menubar, just the contents rendered in java, i.e. an exact image of what is visible in the java application at the moment. I would also like the screenshot to be software rendered, I don't know if I'm using the correct term, but the captured image should not be different on others systems/computers. Can i for example hijack a render buffer/display buffer or something and write that to in image? Does anyone have …

Member Avatar
Member Avatar
+0 forum 1

Hello! I am writing an application for an embedded system with GUI written in swing. I now want to incorporate animations in the GUI to enhance usability. Hypothetical example: The user sees a table with some buttons ant things around it. The user can temporarily "save" the table, which makes the table dissapear into a status icon and a new empty table is shown. The user can then switch between these two tables. The functionality for doing this is already there, but what I want to do now is to animate the dissaperance of the table so that it becomes …

Member Avatar
Member Avatar
+0 forum 2

Hi! I am using a vpn connection to connect to my work network, which I use for remote desktop, which is working fine. I now want to be able to access the same stuff at home that I can access at work. I can for instance write "wiki" in the web browser at work which directs me to the internal wiki page. The problem is that this doesn't work from my home computer with a vpn connection. I tried setting the work dns address (doesn't seem to matter if do or not) in the vpn settings for my home computer. …

Member Avatar
Member Avatar
+0 forum 2

Hi! A small SVN problem? I have an online svn server that I have had for some time that I used for a software project. I want to close that account so I don't have to pay the monthly fee. But before I do that I want to download the entire repository with the entire file history etc to a local svn server on my computer. Questions... Will I need to install a svn server or what not (I use a mac)? How do I download the repository with all files and history into the new repo? Thanks!

Member Avatar
Member Avatar
+0 forum 1

Hi! I want to make a python program that runs different simple command line scripts. Right now I use os.system which works fine for running the scripts, but the problem is that the scripts sometimes halt and wait for input from the user. So my question is, how do i programmatically detect when an input has to be made, and then make that input instead of me having to make it manually? my code like something like this... [code] os.system(aCommand) os.system(anotherCommand) [/code] aCommand and antoherCommand might stop and wait for user input which i want to make programmatically. /Sason

Member Avatar
Member Avatar
+0 forum 3

Hello all! I'm having problems with running c++ on iOS. I have a iOS openGL project in Xcode 4 and an external library written in c++ that has to be a dependency to the iOS target so it can run on an Ipad. right now I'm testing with the iPad simulator. The problem is that i can't include stuff like iostream, string etc, and use them. Is there something i have missed? Does iOS not support C++ or parts of C++, like string and IO stuff? I can use some C++ functionality but many parts seems to be missing. I …

Member Avatar
Member Avatar
+0 forum 2

Hi, Im kind of new to prolog and would like som help. I want to write a rule that only takes integers as input like the following example. rule( X, [] ). rule( X "is integer", [Heat|Tail] ) :- rule(X, Tail). rule( X "is anything else", [Heat|Tail] ) :- rule(X, Tail) Is this functionality avaliable? I want the rule only to be called if X is and Integer and the other rule otherwise. I don't not want to test if X is an integer like this... rule(X, [Head|Tail]) :- integer(X), rule(X,Tail). Anyone who can help?

Member Avatar
+0 forum 0

Hi! I'm having some problems with gridbaglayout trying to get functionality that maybe isn't even there. The problem is the following I have 3 Jpanels with differend contents. I want panel 1 to be displayed to the left of the screen filling the y-axis, panel 2 in the middle filling y and panel 3 to the right. I Want panel 1 to take 1/10 of space in x-direction, panel 2 8/10 and panel 3 1/10 to. So i made these three constraints. [code] GridBagConstraints c1 = new GridBagConstraints(); c1.fill = c1.BOTH; c1.gridx = 0; c1.gridy = 0; c1.weightx = 1; …

Member Avatar
Member Avatar
+0 forum 10

Hi, I have really weird layout problem. I have a class VerticalGridPanel, which uses GridBagLayout to place components top to bottom, left to right, nothing special. Then I have a List of components, which i want to add a part of to a VerticalGridPanel. I then want to add another part of the same list to another VerticalGridPanel, the VerticalGridPanels stores many of the same components from the list. Now the problem is that if I add Components 0-10 from the list to a VerticalGridPanel and then add Component 5-15 to another VerticalGridPanel, then components 5-10 dissapeares from the first …

Member Avatar
Member Avatar
+0 forum 1

Hi, Im writing a java app that uses hibernate for DB stuff. The thing is that it takes some time to start hibernate, and I would like to have a progress bar to show the loading procedure, and maybe print what hibernate is outputting [code] public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from standard (hibernate.cfg.xml) // config file. sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } catch (Throwable ex) { // Log the exception. System.err.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { return sessionFactory; } …

Member Avatar
+0 forum 0

Hi! I'm writing a java app with a swing gui. The problem is the following. I am developing on a mac, where it runs fine. but when I run it on Windows Posready09 (Windows XP), which is the platform the app is intended for, or Windows7, half of the window doesnt load. It just stays gray, until I start to klick on stuff which makes components appear. Also when I drag the window the graphics get all messed up. It worked fine on Windows until recently. I have made some minor adjustments and additions since then, but nothing I can …

Member Avatar
Member Avatar
+0 forum 11

Hi, I have a problem with two classes who both has instances to each other. Here are the header files... [code] #ifndef ENVIRONMENT_H #define ENVIRONMENT_H #include <vector> #include "item.h" #include "actor.h" namespace game{ class Environment{ public: Environment(){} Environment(std::string name_, std::string description_); enum directions { north = 0, north_east = 1, east = 2, south_east = 3, south = 4, south_west = 5, west = 6, north_west = 7 }; void add_item(Item & it); void remove_item(Item & it); void add_exit(const int position, const Environment & env); void remove_exit(const int position); void add_actor(Actor & act); void remove_actor(Actor & act); protected: std::string name, …

Member Avatar
Member Avatar
+0 forum 1

Hello! I am a student from Stockholm, Sweden studying Computer Science at KTH (Translation, RIT - Royal Institute of technology), and I have about a year left to get my masters degree. My concentration is on Autonomous Systems where it mostly comes down to computer vision (Object detection, computer geometry etc). I'm very much looking forward to see what this community has to offer and I myself will try to be as helpfull as I can. Cheers!

Member Avatar
Member Avatar
+0 forum 1

Hi! I am having some problems with using the operator= on an dereferences object. I have the code... [CODE]Julian j1(2319,1,7); Date * dp = new Gregorian(2319,1,23); cout << (*dp) << " " << typeid(*dp).name() << endl; *dp = j1; cout << (*dp) << " " << typeid(*dp).name() << endl; j1 = *dp; cout << (j1) << " " << typeid(j1).name() << endl;[/CODE] which gives me the output [CODE=text]2319-01-23 N4lab29GregorianE 2319-01-07 N4lab29GregorianE operator= Julian 2318-12-22 N4lab26JulianE[/CODE] The problem is that *dp = j1 does not call the operator= in Gregorian. Instead it seems like a synthesized function is being called. Here …

Member Avatar
Member Avatar
+0 forum 1

The End.